Skip to content

Commit

Permalink
HHH-8261 missing null check of type definition parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
stliu committed May 22, 2013
1 parent 390e72e commit 3e59f96
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Expand Up @@ -261,7 +261,7 @@ public static Iterable<CascadeStyle> interpretCascadeStyles(String cascades, Loc

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 ) {
Expand Down
Expand Up @@ -46,7 +46,9 @@ public TypeDefinition(
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() {
Expand Down
Expand Up @@ -44,7 +44,7 @@
/**
* @author Gavin King
*/
@FailureExpectedWithNewMetamodel
//@FailureExpectedWithNewMetamodel
public class CompositeUserTypeTest extends BaseCoreFunctionalTestCase {
@Override
public String[] getMappings() {
Expand Down

0 comments on commit 3e59f96

Please sign in to comment.