openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1680071 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
Date Mon, 18 May 2015 19:02:39 GMT
Author: struberg
Date: Mon May 18 19:02:39 2015
New Revision: 1680071

URL: http://svn.apache.org/r1680071
Log:
improve equals for SerializableBeans

worked before as well, but now it's easier to read.

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java?rev=1680071&r1=1680070&r2=1680071&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
Mon May 18 19:02:39 2015
@@ -435,7 +435,7 @@ public abstract class AbstractOwbBean<T>
     @Override
     public boolean equals(Object o)  // symmetry for serializable beans otherwise Map are
broken, hashcode if fine
     {
-        return o == this || (SerializableBean.class.isInstance(o) && SerializableBean.class.cast(o).equals(this));
+        return o == this || (o instanceof SerializableBean && ((SerializableBean)
o).getBean().equals(this));
     }
 
     @Override



Mime
View raw message