cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/precept InstanceFactory.java
Date Thu, 04 Apr 2002 07:00:40 GMT
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:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message