[seam-commits] Seam SVN: r7902 - branches/Seam_2_0/src/main/org/jboss/seam/init.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Apr 11 01:17:24 EDT 2008


Author: shane.bryzak at jboss.com
Date: 2008-04-11 01:17:24 -0400 (Fri, 11 Apr 2008)
New Revision: 7902

Modified:
   branches/Seam_2_0/src/main/org/jboss/seam/init/Initialization.java
Log:
JBSEAM-2865

Modified: branches/Seam_2_0/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- branches/Seam_2_0/src/main/org/jboss/seam/init/Initialization.java	2008-04-11 04:42:27 UTC (rev 7901)
+++ branches/Seam_2_0/src/main/org/jboss/seam/init/Initialization.java	2008-04-11 05:17:24 UTC (rev 7902)
@@ -476,7 +476,20 @@
       }
       if ( !set.add(descriptor) )
       {
-         throw new IllegalStateException("Two components with the same name and precedence: " + name);
+         ComponentDescriptor other = null;
+         for (ComponentDescriptor d : set)
+         {
+            if (descriptor.compareTo(d) == 0)
+            {
+               other = d;
+               break;
+            }
+         }
+         
+         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