geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r938204 - /geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
Date Mon, 26 Apr 2010 19:34:38 GMT
Author: gawor
Date: Mon Apr 26 19:34:37 2010
New Revision: 938204

URL: http://svn.apache.org/viewvc?rev=938204&view=rev
Log:
Implement hashCode() and equals() for BundleClassLoader.

Modified:
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java?rev=938204&r1=938203&r2=938204&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
Mon Apr 26 19:34:37 2010
@@ -169,4 +169,21 @@ public class BundleClassLoader extends C
     public Bundle getBundle() {
         return getBundle(true);
     }
+    
+    @Override
+    public int hashCode() {
+        return bundle.hashCode();
+    }
+ 
+    @Override
+    public boolean equals(Object other) {
+        if (other == this) {
+            return true;
+        }
+        if (other == null || !other.getClass().equals(getClass())) {
+            return false;
+        }
+        BundleClassLoader otherBundleClassLoader = (BundleClassLoader) other;
+        return this.bundle == otherBundleClassLoader.bundle;
+    }
 }



Mime
View raw message