tcurdt 02/04/03 23:00:40 Modified: src/scratchpad/src/org/apache/cocoon/precept InstanceFactory.java Log: throw an Exception on instances with the same name Revision Changes Path 1.3 +4 -0 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/InstanceFactory.java Index: InstanceFactory.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept/InstanceFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- InstanceFactory.java 25 Mar 2002 23:23:54 -0000 1.2 +++ InstanceFactory.java 4 Apr 2002 07:00:40 -0000 1.3 @@ -85,6 +85,10 @@ Configuration instance = instances[p]; String name = instance.getAttribute("name"); getLogger().debug("registering instance [name=" + String.valueOf(name) + ";impl=" + String.valueOf(instance.getAttribute("impl")) + "]"); + if (instanceConfigurationMap.containsKey(name)) { + getLogger().error("instance [name=" + String.valueOf(name) + "] appears more than once"); + throw new ConfigurationException("instance [name=" + String.valueOf(name) + "] appears more than once"); + } instanceConfigurationMap.put(name, instance); } }
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]