mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-10 21:24:49 +00:00
HHH-11495 Return a defensive copy of the array
This commit is contained in:
parent
9684afda76
commit
e17491a198
@ -8,6 +8,7 @@
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@ -624,7 +625,9 @@ else if ( result == INVALID_IMPORT ) {
|
||||
* @throws MappingException
|
||||
*/
|
||||
public String[] getImplementors(String className) throws MappingException {
|
||||
return implementorsCache.computeIfAbsent( className, this::doGetImplementors );
|
||||
String[] implementors = implementorsCache.computeIfAbsent( className, this::doGetImplementors );
|
||||
|
||||
return Arrays.copyOf( implementors, implementors.length );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user