mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-04 11:23:50 +00:00
Try to fix serialization bug
This commit is contained in:
1 parent
fc05cda6fa
commit
955ac3f436
1 file changed
+4
-5
+4
-5
@@ -33,10 +33,9 @@ public class SerializablePositionImpl implements SerializablePosition, Serializa
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
long temp;
|
||||
temp = Double.doubleToLongBits(latDeg);
|
||||
int temp = (int) latDeg;
|
||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
temp = Double.doubleToLongBits(lngDeg);
|
||||
temp = (int) lngDeg;
|
||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
return result;
|
||||
}
|
||||
@@ -50,9 +49,9 @@ public class SerializablePositionImpl implements SerializablePosition, Serializa
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
SerializablePositionImpl other = (SerializablePositionImpl) obj;
|
||||
if (Double.doubleToLongBits(latDeg) != Double.doubleToLongBits(other.latDeg))
|
||||
if (new Double(latDeg).equals(other.latDeg))
|
||||
return false;
|
||||
if (Double.doubleToLongBits(lngDeg) != Double.doubleToLongBits(other.lngDeg))
|
||||
if (new Double(lngDeg).equals(other.lngDeg))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user