[vlma-devel] commit: Do not override equals vut not hashCode. (Adrien Grand )

git version control git at videolan.org
Thu Jan 1 23:54:46 CET 2009


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Thu Jan  1 23:29:30 2009 +0100| [d42c8e3f25ac2e78a0210ac7ef007bfb1b872a29] | committer: Adrien Grand 

Do not override equals vut not hashCode.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=d42c8e3f25ac2e78a0210ac7ef007bfb1b872a29
---

 .../org/videolan/vlma/model/StreamingStrategy.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/vlma-api/src/main/java/org/videolan/vlma/model/StreamingStrategy.java b/vlma-api/src/main/java/org/videolan/vlma/model/StreamingStrategy.java
index 452a5d2..b8098d5 100644
--- a/vlma-api/src/main/java/org/videolan/vlma/model/StreamingStrategy.java
+++ b/vlma-api/src/main/java/org/videolan/vlma/model/StreamingStrategy.java
@@ -184,4 +184,13 @@ public class StreamingStrategy implements Serializable {
         }
         return false;
     }
+
+    @Override
+    public int hashCode() {
+        int result = type.hashCode();
+        result += 13*protocol.hashCode();
+        result += 13*encapsulation.hashCode();
+        return result;
+    }
+
 }



More information about the vlma-devel mailing list