-
Notifications
You must be signed in to change notification settings - Fork 98
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
NullPointerException raised by POJOAnnotationFormatter.format(...) #318
Comments
dgrandemange
pushed a commit
to dgrandemange/JGiven
that referenced
this issue
May 27, 2017
Ok, thank you for the clarification. Datatable examples have been completed to reproduce the issue. |
dgrandemange
pushed a commit
to dgrandemange/JGiven
that referenced
this issue
May 27, 2017
dgrandemange
pushed a commit
to dgrandemange/JGiven
that referenced
this issue
Jun 4, 2017
janschaefer
pushed a commit
that referenced
this issue
Jun 15, 2017
janschaefer
pushed a commit
that referenced
this issue
Jun 15, 2017
janschaefer
pushed a commit
that referenced
this issue
Jun 15, 2017
Fixed by #319 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi again,
Lately, i face a situation where
POJOAnnotationFormatter.format(java.lang.Object argumentToFormat, Formatf annotation)
raise a
NullPointerException
.This occurs when received parameter
argumentToFormat
is null.My
POJOAnnotationFormatter
implementation clearly misses something here.This could be fixed by early inserting a check to test if
argumentToFormat
is null, and if that is the case, immediatly return null which, IMHO, is better than returning an empty string (can't see any indication about this in interfaceAnnotationArgumentFormatter.format(java.lang.Object argumentToFormat, Formatf annotation)
contract though.)By returning null (rather than an empty string), this make this null POJO object further evictable when part of a
@Table
formatting where attributeincludeNullColumns
is set tofalse
.The text was updated successfully, but these errors were encountered: