geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r938291 - /geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java
Date Tue, 27 Apr 2010 01:53:06 GMT
Author: djencks
Date: Tue Apr 27 01:53:06 2010
New Revision: 938291

URL: http://svn.apache.org/viewvc?rev=938291&view=rev
Log:
Port equals and hashcode method from g. trunk r 938204

Modified:
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java?rev=938291&r1=938290&r2=938291&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java
Tue Apr 27 01:53:06 2010
@@ -169,4 +169,22 @@ 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