diff options
author | Sven Gothel <[email protected]> | 2014-07-08 10:10:39 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-08 10:10:39 +0200 |
commit | b5910f18f0b82a8a1f6f6252dc19971d5e487f39 (patch) | |
tree | 6dda5be680d970e8def378d97f71dea4a3f2d40f /src/jogl/classes/com/jogamp/graph | |
parent | 326cd5074f14d89a2cd8a6658472784aeda11a87 (diff) |
Findbugs.normal: Adding safeguard hashCode() implementation throwing InternalError("hashCode not designed")
As long we don't use Object.hashCode() to idenitify the memory address, we can safeguard the code.
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java | 5 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/geom/Outline.java | 4 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/geom/SVertex.java | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java index 939035c69..e7c452fb4 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java +++ b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java @@ -791,4 +791,9 @@ public class OutlineShape implements Comparable<OutlineShape> { } return true; } + + @Override + public final int hashCode() { + throw new InternalError("hashCode not designed"); + } } diff --git a/src/jogl/classes/com/jogamp/graph/geom/Outline.java b/src/jogl/classes/com/jogamp/graph/geom/Outline.java index ea2059165..4caf06e5d 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Outline.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Outline.java @@ -274,4 +274,8 @@ public class Outline implements Comparable<Outline> { } return true; } + @Override + public final int hashCode() { + throw new InternalError("hashCode not designed"); + } } diff --git a/src/jogl/classes/com/jogamp/graph/geom/SVertex.java b/src/jogl/classes/com/jogamp/graph/geom/SVertex.java index 8df8fbb31..4846ff5f1 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/SVertex.java +++ b/src/jogl/classes/com/jogamp/graph/geom/SVertex.java @@ -185,6 +185,10 @@ public class SVertex implements Vertex { VectorUtil.isVec3Equal(getTexCoord(), 0, v.getTexCoord(), 0, FloatUtil.EPSILON) && VectorUtil.isVec3Equal(getCoord(), 0, v.getCoord(), 0, FloatUtil.EPSILON) ; } + @Override + public final int hashCode() { + throw new InternalError("hashCode not designed"); + } @Override public final float[] getTexCoord() { |