SchemaAndTable hashCode() and equals() methods throw NullPointerException in case of null schema #918

Closed
attila-kiss-it opened this Issue Sep 1, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@attila-kiss-it
Contributor

attila-kiss-it commented Sep 1, 2014

Either the construct should check for null parameters or the equals and hashCode should handle null values.

java.lang.NullPointerException
at com.mysema.query.sql.SchemaAndTable.hashCode(SchemaAndTable.java:52)
at java.util.HashMap.hash(HashMap.java:338)
at java.util.HashMap.get(HashMap.java:556)
at com.mysema.query.sql.Configuration.getColumnOverride(Configuration.java:218)
at com.mysema.query.sql.SQLSerializer.appendAsColumnName(SQLSerializer.java:86)
at com.mysema.query.sql.SQLSerializer.visit(SQLSerializer.java:791)
at com.mysema.query.sql.SQLSerializer.visit(SQLSerializer.java:39)
at com.mysema.query.types.path.NumberPath.accept(NumberPath.java:53)
at com.mysema.query.support.SerializerBase.handle(SerializerBase.java:105)
at com.mysema.query.support.SerializerBase.handle(SerializerBase.java:137)
at com.mysema.query.sql.SQLSerializer.serializeForInsert(SQLSerializer.java:511)
at com.mysema.query.sql.SQLTemplates.serializeInsert(SQLTemplates.java:762)
at com.mysema.query.sql.SQLSerializer.serializeInsert(SQLSerializer.java:492)
at com.mysema.query.sql.dml.SQLInsertClause.createStatement(SQLInsertClause.java:234)
at com.mysema.query.sql.dml.SQLInsertClause.executeWithKeys(SQLInsertClause.java:291)
at com.mysema.query.sql.dml.SQLInsertClause.executeWithKey(SQLInsertClause.java:178)
at com.mysema.query.sql.dml.SQLInsertClause.executeWithKey(SQLInsertClause.java:161)

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Sep 1, 2014

Member

Thanks for the bug report! I added a PR to fix it.

Member

timowest commented Sep 1, 2014

Thanks for the bug report! I added a PR to fix it.

@timowest timowest added this to the 3.5.0 milestone Sep 1, 2014

@timowest timowest closed this in #919 Sep 2, 2014

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Sep 30, 2014

Member

Released in 3.5.0

Member

timowest commented Sep 30, 2014

Released in 3.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment