Is this serious GWT err "Something other than an int was returned from JSNI method @..."?

StackOverflow https://stackoverflow.com/questions/22936628

  •  29-06-2023
  •  | 
  •  

Question

I have this error longtime ago but not sure when it happened,

Maybe (BUT NOT SURE 100%) when i do some sort of mouse move & identify the coordinate of widget.

This is the error:

[WARN] - Something other than an int was returned from JSNI method '@com.google.gwt.dom.client.DOMImpl::eventGetClientX(Lcom/google/gwt/dom/client/NativeEvent;)': Rounding double (1239.1300048828125) to int for int

The error is not in Red so i don't think it's serious. Also the system is still running OK so i don't bore until today I suddenly think that:

  • "Is a Good / Robust final Gwt app before deployed into Production Product must not contain any kind of error in eClipse?". or "Just don't care an unimportant error as it will be OK?"

I include a picture of this error from my eclipse enter image description here

Should I bore this error? If I should, then how to fix it?

Was it helpful?

Solution

I'd bet this is (was) a known sub-pixel issue.

Newer browser returns pixel values as double rather that int on DOM operations, events and such. This is why you are seeing those messages.

As the warning states, the retuned double value is rounded to the nearest int and shouldn't likely be a problem per se (but logging tons of those messages might be). GWT 2.6 holds a proper fix for that, so your may want to upgrade, workaround (as in the patch), or simply ignore it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top