HHH-8261 missing null check of type definition parameters

This commit is contained in:
Strong Liu 2013-05-22 16:20:52 -07:00
parent 390e72e2c1
commit 3e59f961fc
3 changed files with 5 additions and 3 deletions

View File

@ -261,7 +261,7 @@ public class Helper {
public static Map<String, String> extractParameters(List<JaxbParamElement> xmlParamElements) {
if ( xmlParamElements == null || xmlParamElements.isEmpty() ) {
return null;
return Collections.emptyMap();
}
final HashMap<String,String> params = new HashMap<String, String>();
for ( JaxbParamElement paramElement : xmlParamElements ) {

View File

@ -46,7 +46,9 @@ public class TypeDefinition implements Serializable {
this.name = name;
this.typeImplementorClass = typeImplementorClass;
this.registrationKeys= registrationKeys;
this.parameters = Collections.unmodifiableMap( parameters );
this.parameters = parameters == null ? Collections.<String, String>emptyMap() : Collections.unmodifiableMap(
parameters
);
}
public String getName() {

View File

@ -44,7 +44,7 @@ import static org.junit.Assert.assertEquals;
/**
* @author Gavin King
*/
@FailureExpectedWithNewMetamodel
//@FailureExpectedWithNewMetamodel
public class CompositeUserTypeTest extends BaseCoreFunctionalTestCase {
@Override
public String[] getMappings() {