Okay, I have to admit having looked at this a bit, I'm now more confused than ever.
- JsoDevirtualizer deals only with equals(), hashCode(), and toString(). As far as I can tell, changing isJavaObject() will cause "null.equals()" to inappropriately dispatch to JavaScriptObject.equals() instead of the throwing the NPE. - Details aside, it sounds like you're proposing to have a null instance of a dual-interface dispatch to the JSO version. That seems... really broken to me! - It's not clear to me, with or without this patch, that the conditionals that get generated in JavaScriptObjectNormalizer (which runs before optimizations) will ever get properly cleaned up if the Java implementors all get pruned. http://gwt-code-reviews.appspot.com/1351801/diff/1/4 File dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Cast.java (right): http://gwt-code-reviews.appspot.com/1351801/diff/1/4#newcode68 dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Cast.java:68: if (src != null && isJavaObject(src)) { Then remove the null check here. http://gwt-code-reviews.appspot.com/1351801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
