[seam-commits] Seam SVN: r15067 - branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/intercept.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Aug 23 07:03:43 EDT 2012


Author: maschmid
Date: 2012-08-23 07:03:43 -0400 (Thu, 23 Aug 2012)
New Revision: 15067

Modified:
   branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java
Log:
JBSEAM-4966 don't let calling equals on ourselves make us dirty


Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java	2012-08-23 10:07:12 UTC (rev 15066)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java	2012-08-23 11:03:43 UTC (rev 15067)
@@ -81,16 +81,10 @@
          }
       }
 
-      if ( markDirty(method) )
-      {
-         //mark it dirty each time it gets called 
-         //this flag will be ignored if the bean 
-         //implements Mutable
-         dirty = true;
-      }
-   
       //make default equals() method return true when called on itself
       //by unwrapping the proxy
+      //We don't let calling this equals make us dirty, as we assume it is without side effects
+      //this assumption is required, as Mojarra 2.0 calls equals during SessionMap.put, see JBSEAM-4966
       if ( method.getName().equals("equals") 
                && method.getParameterTypes().length == 1
                && method.getParameterTypes()[0] == Object.class
@@ -99,7 +93,14 @@
             return interceptInvocation(method, new Object[]{bean});
       }
 
-      
+      if ( markDirty(method) )
+      {
+         //mark it dirty each time it gets called 
+         //this flag will be ignored if the bean 
+         //implements Mutable
+         dirty = true;
+      }   
+
       Object result = interceptInvocation(method, params);
       return result==bean ? proxy : result;
 



More information about the seam-commits mailing list