[seam-commits] Seam SVN: r12531 - branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/init.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Apr 20 14:52:43 EDT 2010


Author: manaRH
Date: 2010-04-20 14:52:42 -0400 (Tue, 20 Apr 2010)
New Revision: 12531

Modified:
   branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/init/Initialization.java
Log:
back ported JBSEAM-3996

Modified: branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/init/Initialization.java	2010-04-20 16:27:27 UTC (rev 12530)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/init/Initialization.java	2010-04-20 18:52:42 UTC (rev 12531)
@@ -539,11 +539,16 @@
                break;
             }
          }
-         
-         throw new IllegalStateException("Two components with the same name and precedence - " +
+         // for the same component name and the same class in classpath don't throw exception,
+         // use the first in classpath as standard order - JBSEAM-3996 
+         Class clazz = descriptor.getComponentClass();         
+         if (!clazz.getName().equals(other.getComponentClass().getName())) 
+         {         
+            throw new IllegalStateException("Two components with the same name and precedence - " +
                "component name: " + name + ", component classes: " + 
                descriptor.getComponentClass().getName() + ", " +
                (other != null ? other.getComponentClass().getName() : "<unknown>"));
+         }
       }
    }
 



More information about the seam-commits mailing list