Wednesday, August 23, 2017

Re: ClassCastException in generics

    instanceOfArrayBuffer for file = false
    instanceOfArrayBuffer for good copy = true
 Uncaught Error: java.lang.ClassCastException 

I think that it is a problem for generics. 
GWT will fail its checkcast for any instance of system type (like array buffer or whatever) for any class created other in any context other then $wnd.

JS "new ArrayBuffer(10)" and "new $wnd.ArrayBuffer(10)" has different type from GWT point of view.

Then my next question: 

if GWT generates checkckast as "yze_g$(fileBuffer_0_g$, $wnd.ArrayBuffer)",  where "$wnd.ArrayBuffer" is a type
how can I ask GWT to generate checkckast  to ArrayBuffer, not to $wnd.ArrayBuffer ? 

Thanks 

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment