Author: manaRH
Date: 2010-02-05 06:46:40 -0500 (Fri, 05 Feb 2010)
New Revision: 12014
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java
Log:
JBSEAM-3996
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java 2010-02-04
19:28:38 UTC (rev 12013)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java 2010-02-05
11:46:40 UTC (rev 12014)
@@ -599,10 +599,16 @@
}
}
- 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>"));
+ // 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.equals(other.getComponentClass()))
+ {
+ 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>"));
+ }
}
}