Commits

Anonymous committed 5b2f2ec

configuration improvement to detect misconfigurations (different package with same name)
Issue number: XW-291
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@874e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork/config/impl/DefaultConfiguration.java

     }
 
     public void addPackageConfig(String name, PackageConfig packageContext) {
+      PackageConfig check = (PackageConfig) packageContexts.get(name);
+        if (check != null) {
+             LOG.error("The package name '" + name + "' is already been used by another package: " + check);
+            // would be better to throw ConfigurationException("name already used");
+        }
         packageContexts.put(name, packageContext);
     }