Commits

Anonymous committed 8f20e6d

Took out compatibility mode (moving to Struts), better error
handling
XW-390

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

Comments (0)

Files changed (3)

src/java/com/opensymphony/xwork2/config/impl/ActionConfigMatcher.java

                 
                 int lastStar = name.lastIndexOf('*');
                 if (lastStar > 1 && lastStar == name.length() - 1) {
-                    if (name.charAt(lastStar - 2) == '*' && name.charAt(lastStar - 1) != '*') {
+                    if (name.charAt(lastStar - 1) != '*') {
                         pattern = wildcard.compilePattern(name.substring(0, lastStar - 1));
                         compiledPaths.add(new Mapping(name, pattern, configs.get(name)));
                     }

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

     public void addPackageConfig(String name, PackageConfig packageContext) {
         PackageConfig check = packageContexts.get(name);
         if (check != null) {
-            LOG.error("The package name '" + name + "' is already been used by another package: " + check);
+            throw new ConfigurationException("The package name '" + name 
+                    + "' is already been used by another package: " + check,
+                    packageContext);
             // would be better to throw ConfigurationException("name already used");
         }
         packageContexts.put(name, packageContext);
         public synchronized ActionConfig getActionConfig(String namespace, String name) {
             ActionConfig config = null;
             Map<String, ActionConfig> actions = namespaceActionConfigs.get((namespace == null) ? "" : namespace);
-
             if (actions != null) {
                 config = actions.get(name);
                 // Check wildcards

src/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java

     private Configuration configuration;
     private Set includedFileNames = new TreeSet();
     private String configFileName;
-    private boolean compatMode = false;
     private boolean errorIfMissing;
     private Map<String,String> dtdMappings;
 
         return dtdMappings;
     }
     
-    public void setCompatibilityMode(boolean mode) {
-        this.compatMode = mode;
-    }
-
-
     public void destroy() {
     }
 
             return;
         }
         
-        // If in XWork 1.x compatibility mode, add a wildcard pattern to
-        // support legacy method declarations
-        if (compatMode) {
-            if (name.indexOf('*') == -1 && methodName == null) {
-                name += "!*";
-                methodName = "{1}";
-            }
-        }
-
         Map actionParams = XmlHelper.getParams(actionElement);
 
         Map results;