Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Milestone

Comments

@attila-kiss-it
Copy link
Contributor

@attila-kiss-it 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
Copy link
Member

@timowest 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
Copy link
Member

@timowest 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.