If you need to disable cast checking, you are definitely doing something wrong; you should fix underlying problem instead of disabling checks.
On Sun, May 1, 2016 at 6:19 AM, Paul Stockley <[email protected]> wrote: > I am trying to create a native JsType to represent a javascript Array. Up > to this point I have been using JSNI. Below is the outline of what I have. > I want to use an Interface as my eventual goal is to be able to define JSON > structures using the same class on client and server. > > @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Array") > public interface Array<T> { > > > @JsOverlay > default T get(int index) { > return JSHelper.getArrayValue(this, index); > > } > > > ...Rest of native methods > > > *}* > > > The Helper.getArrayValue method maps to a native function I define outside of > GWT. I have been trying to track down an error that > > only happened in SDM. When I called the get method, I would get the following > error: > > > > *ArrayTest.java:14Uncaught ReferenceError: S$c_g$ is not defined* > > > On a side note, tracking down these kind of problems is a real pain given > that all the function names are obfuscated in SDM. > > I tried -XmethodNameDisplayMode ABBREVIATED. However, this only works for > methods defined in my modules. Is there another > > way to turn off obfuscation? > > > Anyway, it turns out the problem is the following line I had in may gwt.xml > file > > > <set-property name="jre.checks.checkLevel" value="MINIMAL" /> > > > I had this to strip out cast checking from my final production compile. If I > remove this, it works fine. > > > > -- > You received this message because you are subscribed to the Google Groups > "GWT Contributors" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-web-toolkit-contributors/26f49d6c-a5fc-4dbe-9f9e-840be96a2f1c%40googlegroups.com > <https://groups.google.com/d/msgid/google-web-toolkit-contributors/26f49d6c-a5fc-4dbe-9f9e-840be96a2f1c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "GWT Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAN%3DyUA1wnQtQPnijczifuydAX_%3D1jaTFmt-2bZbHk4mhdzCP7w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
