We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Found in GWT 2.7.0.
When using long value in validation annotation, the generated code is wrong.
For example using Max annotation on validation model with long value:
@Override @Max(value = 9999999999L, message = "OPID_CODE_INVALID_FORMAT") public Long getOpId() { return super.getOpId(); }
Will generate validator implementation with:
.setAnnotation( new javax.validation.constraints.Max(){ public Class<? extends Annotation> annotationType() { return javax.validation.constraints.Max.class; } public java.lang.Class[] groups() { return new java.lang.Class[] {};} public long value() { return 1410065407L;} public java.lang.String message() { return "OPID_CODE_INVALID_FORMAT";} public java.lang.Class[] payload() { return new java.lang.Class[] {};} } ) .setAttributes(attributeBuilder() .put("message", "OPID_CODE_INVALID_FORMAT") .put("value", 1410065407L) .put("payload", new java.lang.Class[] {}) .put("groups", new java.lang.Class[] {javax.validation.groups.Default.class}) .build())
Problem is in GwtSpecificValidatorCreator.asLiteral method:
Current code:
} else if (value instanceof Long) { return JLongLiteral.get(((Long) value).intValue()).toSource();
Should be:
} else if (value instanceof Long) { return JLongLiteral.get(((Long) value).longValue()).toSource();
The text was updated successfully, but these errors were encountered:
Can you submit a fix in Gerrit? http://www.gwtproject.org/makinggwtbetter.html Thanks
Sorry, something went wrong.
https://gwt-review.googlesource.com/14431
GwtSpecificValidatorCreator generates wrong code for annotations with…
17ee802
… long value Bug-Link: gwtproject#9288 Change-Id: Ib1c9956f51c4e4fdc601db7abb825b73c5b62ef9
No branches or pull requests
Found in GWT 2.7.0.
When using long value in validation annotation, the generated code is wrong.
For example using Max annotation on validation model with long value:
Will generate validator implementation with:
Problem is in GwtSpecificValidatorCreator.asLiteral method:
Current code:
Should be:
The text was updated successfully, but these errors were encountered: