wrong equals comparison
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java
index 7b124f2..c8e04d2 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java
@@ -42,6 +42,24 @@
return "0x" + Integer.toHexString(id);
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + id;
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (obj == null) return false;
+ if (getClass() != obj.getClass()) return false;
+ OFAuxId other = (OFAuxId) obj;
+ if (id != other.id) return false;
+ return true;
+ }
+
public short getValue() {
return id;
}
@@ -54,21 +72,6 @@
return OFAuxId.of(c.readUnsignedByte());
}
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof TableId))
- return false;
- OFAuxId other = (OFAuxId)obj;
- if (other.id != this.id)
- return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- int prime = 13873;
- return this.id * prime;
- }
@Override
public int compareTo(OFAuxId other) {