HHH-8261 missing null check of type definition parameters
This commit is contained in:
parent
390e72e2c1
commit
3e59f961fc
|
@ -261,7 +261,7 @@ public class Helper {
|
||||||
|
|
||||||
public static Map<String, String> extractParameters(List<JaxbParamElement> xmlParamElements) {
|
public static Map<String, String> extractParameters(List<JaxbParamElement> xmlParamElements) {
|
||||||
if ( xmlParamElements == null || xmlParamElements.isEmpty() ) {
|
if ( xmlParamElements == null || xmlParamElements.isEmpty() ) {
|
||||||
return null;
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
final HashMap<String,String> params = new HashMap<String, String>();
|
final HashMap<String,String> params = new HashMap<String, String>();
|
||||||
for ( JaxbParamElement paramElement : xmlParamElements ) {
|
for ( JaxbParamElement paramElement : xmlParamElements ) {
|
||||||
|
|
|
@ -46,7 +46,9 @@ public class TypeDefinition implements Serializable {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.typeImplementorClass = typeImplementorClass;
|
this.typeImplementorClass = typeImplementorClass;
|
||||||
this.registrationKeys= registrationKeys;
|
this.registrationKeys= registrationKeys;
|
||||||
this.parameters = Collections.unmodifiableMap( parameters );
|
this.parameters = parameters == null ? Collections.<String, String>emptyMap() : Collections.unmodifiableMap(
|
||||||
|
parameters
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
|
|
@ -44,7 +44,7 @@ import static org.junit.Assert.assertEquals;
|
||||||
/**
|
/**
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
*/
|
*/
|
||||||
@FailureExpectedWithNewMetamodel
|
//@FailureExpectedWithNewMetamodel
|
||||||
public class CompositeUserTypeTest extends BaseCoreFunctionalTestCase {
|
public class CompositeUserTypeTest extends BaseCoreFunctionalTestCase {
|
||||||
@Override
|
@Override
|
||||||
public String[] getMappings() {
|
public String[] getMappings() {
|
||||||
|
|
Loading…
Reference in New Issue