mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-07 11:32:16 +00:00
Error: Double.doubletoLongBits() not supported by GWTError:
Double.doubletoLongBits() not supported by GWT
This commit is contained in:
1 parent
18fb375256
commit
d3c659a1a5
3 files changed
+30
-33
No files matched your search
+1
-1
@@ -19,7 +19,7 @@ public class PlacemarkImpl implements Placemark {
|
||||
|
||||
private String name;
|
||||
private String countryCode;
|
||||
// private SerializablePosition position;
|
||||
private SerializablePosition position;
|
||||
private long population;
|
||||
|
||||
PlacemarkImpl() {}
|
||||
|
||||
+28
-31
@@ -1,11 +1,9 @@
|
||||
package com.sap.sailing.domain.common.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.domain.common.Position;
|
||||
import com.sap.sailing.domain.common.SerializablePosition;
|
||||
|
||||
public class SerializablePositionImpl implements SerializablePosition, Serializable {
|
||||
public class SerializablePositionImpl implements SerializablePosition {
|
||||
private static final long serialVersionUID = -5649921262460723024L;
|
||||
|
||||
private double latDeg;
|
||||
@@ -14,7 +12,6 @@ public class SerializablePositionImpl implements SerializablePosition, Serializa
|
||||
SerializablePositionImpl() {}
|
||||
|
||||
public SerializablePositionImpl(double latDeg, double lngDeg) {
|
||||
super();
|
||||
this.latDeg = latDeg;
|
||||
this.lngDeg = lngDeg;
|
||||
}
|
||||
@@ -29,32 +26,32 @@ public class SerializablePositionImpl implements SerializablePosition, Serializa
|
||||
return "(" + latDeg + ", " + lngDeg + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
long temp;
|
||||
temp = Double.doubleToLongBits(latDeg);
|
||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
temp = Double.doubleToLongBits(lngDeg);
|
||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
SerializablePositionImpl other = (SerializablePositionImpl) obj;
|
||||
if (Double.doubleToLongBits(latDeg) != Double.doubleToLongBits(other.latDeg))
|
||||
return false;
|
||||
if (Double.doubleToLongBits(lngDeg) != Double.doubleToLongBits(other.lngDeg))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
// @Override
|
||||
// public int hashCode() {
|
||||
// final int prime = 31;
|
||||
// int result = 1;
|
||||
// long temp;
|
||||
// temp = Double.doubleToLongBits(latDeg);
|
||||
// result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
// temp = Double.doubleToLongBits(lngDeg);
|
||||
// result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean equals(Object obj) {
|
||||
// if (this == obj)
|
||||
// return true;
|
||||
// if (obj == null)
|
||||
// return false;
|
||||
// if (getClass() != obj.getClass())
|
||||
// return false;
|
||||
// SerializablePositionImpl other = (SerializablePositionImpl) obj;
|
||||
// if (Double.doubleToLongBits(latDeg) != Double.doubleToLongBits(other.latDeg))
|
||||
// return false;
|
||||
// if (Double.doubleToLongBits(lngDeg) != Double.doubleToLongBits(other.lngDeg))
|
||||
// return false;
|
||||
// return true;
|
||||
// }
|
||||
|
||||
}
|
||||
+1
-1
@@ -167,7 +167,7 @@ public class ReverseGeocoderImpl implements ReverseGeocoder {
|
||||
} catch (ClassCastException e) {
|
||||
lngDeg = ((Long) json.get("lng")).doubleValue();
|
||||
}
|
||||
SerializablePosition position = new SerializablePositionImpl(latDeg, lngDeg);
|
||||
// SerializablePosition position = new SerializablePositionImpl(latDeg, lngDeg);
|
||||
|
||||
long population = (Long) json.get("population");
|
||||
|
||||
|
||||
Reference in new issue
Block a user