EnumType.setParameterValues(Properties) reads the passed properties using properties.get() instead of properties.getProperty(). This causes NullPointerExceptions when passing in correctly configured parameters that contain nested defaults.
Example: public class EnumByNameType extends EnumType { private static final long serialVersionUID = -5179606529789070604L;
@Override public void setParameterValues(Properties parameters) { Properties patchedParams = new Properties(parameters); patchedParams.setProperty(TYPE, Integer.toString(Types.VARCHAR)); super.setParameterValues(patchedParams ); }
One should always use getProperty() when dealing with Java Properties. Also feel free to make a complaint to the original Java properties class developer for the poor API design ![](https://hibernate.atlassian.net/images/icons/emoticons/wink.gif)
|