http://gwt-code-reviews.appspot.com/1601805/diff/1/user/src/com/google/web/bindery/autobean/shared/ValueCodex.java
File user/src/com/google/web/bindery/autobean/shared/ValueCodex.java
(right):

http://gwt-code-reviews.appspot.com/1601805/diff/1/user/src/com/google/web/bindery/autobean/shared/ValueCodex.java#newcode368
user/src/com/google/web/bindery/autobean/shared/ValueCodex.java:368: if
(clazz.isEnum()) {
Oh, I don't know why I had that in this CL, but the rationale is: in the
only case where findType can be called with an
"enum-value-with-overridden-methods' class" (a subclass of the isEnum
class), it's OK for findType to return null because the value will be
"upcasted" (and ENUM.canUpcast will then return true, so it'll correctly
be used); see encode(Object) above.
So the question is whether to add an overhead for every encoded value
(checking getSuperClass.isEnum here) or only for those specific enum
values (loop over the types and ask them if they canUpcast the value).
I'd rather say the latter, hence this change.

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

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

Reply via email to