On Thu, Feb 17, 2011 at 6:29 PM, Ray Cromwell <[email protected]>wrote:
> That sounds better, but is there a reason why JavaScriptObjectNormalizer > was doing this pre-optimization in the first place? > I dunno.... Bob? > Anyway, in favor of keeping the 'null instanceof JSO' behavior is that the > following code currently will not do a null check either: > > SomeJso foo = getNull(); > foo.someMethod() -> translates to jso$someMethod(foo), even if foo is null; > > In most cases, you'll still get an NPE, when interior of the function tries > to deref 'this'. I'll look at re-rolling this using your proposal. > Yeah, that's not so much my issue. My issue is more that a user writing "null instanceof JSO" should NOT get a 'yes' back. Scott -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
