[seam-commits] Seam SVN: r7903 - trunk/src/main/org/jboss/seam/init.

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


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

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

Modified: trunk/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- trunk/src/main/org/jboss/seam/init/Initialization.java	2008-04-11 05:17:24 UTC (rev 7902)
+++ trunk/src/main/org/jboss/seam/init/Initialization.java	2008-04-11 05:17:52 UTC (rev 7903)
@@ -481,7 +481,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