http://gwt-code-reviews.appspot.com/1746803/diff/1/user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java
File
user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java
(right):

http://gwt-code-reviews.appspot.com/1746803/diff/1/user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java#newcode149
user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java:149:
if (this == o) return true;
please run checkstyle
I am pretty sure {} are required.

http://gwt-code-reviews.appspot.com/1746803/diff/1/user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java#newcode155
user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java:155:
if (propertyPath != null ? !propertyPath.equals(other.propertyPath) :
other.propertyPath != null) {
I usually use the pattern from effective java Item 3.

http://gwt-code-reviews.appspot.com/1746803/diff/1/user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java#newcode219
user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java:219:
result = 31 * result + (invalidValue != null ? invalidValue.hashCode() :
0);
I would list these in the same order as equals to make it easier to
visually verify.

http://gwt-code-reviews.appspot.com/1746803/diff/1/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
File
user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
(right):

http://gwt-code-reviews.appspot.com/1746803/diff/1/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java#newcode759
user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java:759:
writeConstraintDescriptor(sw, constraint, inferElementType(p, propSeen),
I am not sure this will work write

Consider
class Person {

@NotNull
@Size(4)
String name;

@NotNull
String getName() {return name;}
}


I don't think it is safe to base this on if you have seen the property
or not.

Seems like you need to actually check the ElementType of the
constraint..

http://gwt-code-reviews.appspot.com/1746803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to