On Wednesday, January 25, 2017 at 11:56:20 AM UTC+1, Paul wrote:
>
> See 
> http://www.gwtproject.org/javadoc/latest/com/google/gwt/geolocation/client/Position.Coordinates.html
>
> Several methods return Double e.g.
>
> public Double getSpeed()
>
> The JavaScript object overlay that implements this method is...
>
>     @Override
>     public final native Double getSpeed() /*-{
>       return this.speed || null;
>     }-*/;
>
>
> However this.speed is a primitive double or null according to ...
>
> https://developer.mozilla.org/en-US/docs/Web/API/Coordinates 
> <https://www.google.com/url?q=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FAPI%2FCoordinates&sa=D&sntz=1&usg=AFQjCNFFjUO8wVqBCmQhl4-iCr243DE_Uw>
>
> So surely this is incorrect?
>

In GWT 2.7.0 and earlier, returning a JS Number as a java.lang.Double would 
be an error; but in GWT 2.8.0 java.lang.Double and double are 
interchangeable (same for java.lang.Boolean and boolean). This was actually 
reported 2 years ago: https://github.com/gwtproject/gwt/issues/9058
It is however probably incorrect to turn a 0 value into a null yes.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to