glassfish
  1. glassfish
  2. GLASSFISH-20858

Message "Invalid Url Pattern" contains placeholder, while it obviously must contain the invalid pattern

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Debian 7.2, AMD64, JDK 8 (Developer's Preview)

      Description

      I did a typo in the URL pattern of web-resource-collection in web.xml, and as a result receive this stacktrace. Apparently the message contains the placeholder

      {0} while it should contain the false pattern instead.

      [2013-10-16T19:25:11.020+0200] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=99 _ThreadName=AutoDeployer] [timeMillis: 1381944311020] [levelValue: 1000] [[
      Exception during lifecycle processing
      java.lang.IllegalArgumentException: Invalid URL Pattern: [{0}

      ]
      at org.glassfish.web.deployment.node.WebResourceCollectionNode.setElementValue(WebResourceCollectionNode.java:136)
      at com.sun.enterprise.deployment.node.SaxParserHandler.endElement(SaxParserHandler.java:583)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606)
      at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:863)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1786)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2951)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:846)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:775)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:626)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:332)
      at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:318)
      at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:245)
      at com.sun.enterprise.deployment.archivist.Archivist.readStandardDeploymentDescriptor(Archivist.java:665)
      at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:391)
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
      at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
      at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:198)
      at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:222)
      at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:878)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:818)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:374)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:537)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164)
      at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:595)
      at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:482)
      at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:410)
      at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:401)
      at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233)
      at java.util.TimerThread.mainLoop(Timer.java:555)
      at java.util.TimerThread.run(Timer.java:505)

        Activity

        Hide
        Terry2013 added a comment -

        Hi, hong
        I have confirmed the code.
        I think the code for outputing the error message is wrong.
        I create the a patch for this bug.I test it and it works fine.
        Could you please reviwe it?

        Show
        Terry2013 added a comment - Hi, hong I have confirmed the code. I think the code for outputing the error message is wrong. I create the a patch for this bug.I test it and it works fine. Could you please reviwe it?
        Hide
        Hong Zhang added a comment -

        Thanks for submitting a patch for this bug. The WebResourceCollectionNode is owned by the web team, reassign to them for them to review the patch.

        Show
        Hong Zhang added a comment - Thanks for submitting a patch for this bug. The WebResourceCollectionNode is owned by the web team, reassign to them for them to review the patch.
        Hide
        jifeng added a comment -

        Hi, Shing Wai Chan

        I found that the same problem exists in the following classes. In these classes the usage of MessageFormat.format() method is error:

        war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java
        web-core/src/main/java/org/apache/catalina/core/StandardServer.java
        web-glue/src/main/java/org/glassfish/web/config/WebSslConfigHandler.java
        web-glue/src/main/java/org/glassfish/web/deployment/node/FilterMappingNode.java
        web-glue/src/main/java/org/glassfish/web/deployment/node/ServletMappingNode.java
        web-naming/src/main/java/org/apache/naming/ContextBindings.java
        web-naming/src/main/java/org/apache/naming/resources/WARDirContext.java
        web-naming/src/main/java/org/apache/naming/resources/WebDirContext.java

        Show
        jifeng added a comment - Hi, Shing Wai Chan I found that the same problem exists in the following classes. In these classes the usage of MessageFormat.format() method is error: war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java web-core/src/main/java/org/apache/catalina/core/StandardServer.java web-glue/src/main/java/org/glassfish/web/config/WebSslConfigHandler.java web-glue/src/main/java/org/glassfish/web/deployment/node/FilterMappingNode.java web-glue/src/main/java/org/glassfish/web/deployment/node/ServletMappingNode.java web-naming/src/main/java/org/apache/naming/ContextBindings.java web-naming/src/main/java/org/apache/naming/resources/WARDirContext.java web-naming/src/main/java/org/apache/naming/resources/WebDirContext.java
        Hide
        lzg5039 added a comment - - edited

        Hi, Shing Wai Chan

        I use the following source to fix all problems , can you help me to review it .

        Index: war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java
        ===================================================================
        --- war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java	(revision 62639)
        +++ war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java	(working copy)
        @@ -1258,7 +1258,7 @@
                         } catch(AccessControlException ace) {
                             if (logger.isLoggable(Level.WARNING)) {
                                 String msg = MessageFormat.format(
        -                                FIND_CLASS_INTERNAL_SECURITY_EXCEPTION,
        +                                rb.getString(FIND_CLASS_INTERNAL_SECURITY_EXCEPTION),
                                         new Object[]{name, ace.getMessage()});
                                 logger.log(Level.WARNING, msg, ace);
                             }
        @@ -1705,7 +1705,7 @@
                         try {
                             securityManager.checkPackageAccess(name.substring(0,i));
                         } catch (SecurityException se) {
        -                    String error = MessageFormat.format(SECURITY_EXCEPTION, name);
        +                    String error = MessageFormat.format(rb.getString(SECURITY_EXCEPTION), name);
                             if (logger.isLoggable(Level.INFO)) {
                                 logger.log(Level.INFO, error, se);
                             }
        Index: web-core/src/main/java/org/apache/catalina/core/StandardServer.java
        ===================================================================
        --- web-core/src/main/java/org/apache/catalina/core/StandardServer.java	(revision 62639)
        +++ web-core/src/main/java/org/apache/catalina/core/StandardServer.java	(working copy)
        @@ -892,7 +892,7 @@
                     try {
                         oname=new ObjectName( "Catalina:type=Server");
                     } catch (Exception e) {
        -                String msg = MessageFormat.format(ERROR_REGISTERING, e.toString());
        +                String msg = MessageFormat.format(rb.getString(ERROR_REGISTERING), e.toString());
                         log.log(Level.SEVERE, msg, e);
                     }
                 }
        Index: web-glue/src/main/java/org/glassfish/web/config/WebSslConfigHandler.java
        ===================================================================
        --- web-glue/src/main/java/org/glassfish/web/config/WebSslConfigHandler.java	(revision 62639)
        +++ web-glue/src/main/java/org/glassfish/web/config/WebSslConfigHandler.java	(working copy)
        @@ -94,9 +94,9 @@
                 try {
                     if (listener == null) {
                         report.setMessage(
        -                        WebContainer.rb.getString(
        -                                MessageFormat.format(
        -                                        CREATE_SSL_HTTP_NOT_FOUND, command.listenerId)));
        +                        MessageFormat.format(
        +                                WebContainer.rb.getString(
        +                                        CREATE_SSL_HTTP_NOT_FOUND), command.listenerId));
                         httpProtocol = command.findOrCreateProtocol(command.listenerId);
                     } else {
                         httpProtocol = listener.findHttpProtocol();
        @@ -103,9 +103,9 @@
                         Ssl ssl = httpProtocol.getSsl();
                         if (ssl != null) {
                             report.setMessage(
        -                            WebContainer.rb.getString(
        -                                    MessageFormat.format(
        -                                            CREATE_SSL_HTTP_ALREADY_EXISTS, command.listenerId)));
        +                            MessageFormat.format(
        +                                    WebContainer.rb.getString(
        +                                            CREATE_SSL_HTTP_ALREADY_EXISTS), command.listenerId));
                             report.setActionExitCode(ActionReport.ExitCode.FAILURE);
                             return;
                         }
        @@ -134,8 +134,8 @@
         
                 if (networkListener == null) {
                     report.setMessage(
        -                    WebContainer.rb.getString(
        -                            MessageFormat.format(DELETE_SSL_HTTP_LISTENER_NOT_FOUND, command.listenerId)));
        +                    MessageFormat.format(
        +                            WebContainer.rb.getString(DELETE_SSL_HTTP_LISTENER_NOT_FOUND), command.listenerId));
                     report.setActionExitCode(ActionReport.ExitCode.FAILURE);
                     return;
                 }
        @@ -143,8 +143,8 @@
                 Protocol protocol = networkListener.findHttpProtocol();
                 if (protocol.getSsl() == null) {
                     report.setMessage(
        -                    WebContainer.rb.getString(
        -                            MessageFormat.format(DELETE_SSL_ELEMENT_DOES_NOT_EXIST, command.listenerId)));
        +                    MessageFormat.format(
        +                            WebContainer.rb.getString(DELETE_SSL_ELEMENT_DOES_NOT_EXIST), command.listenerId));
                     report.setActionExitCode(ActionReport.ExitCode.FAILURE);
                     return;
                 }
        Index: web-glue/src/main/java/org/glassfish/web/deployment/node/FilterMappingNode.java
        ===================================================================
        --- web-glue/src/main/java/org/glassfish/web/deployment/node/FilterMappingNode.java	(revision 62639)
        +++ web-glue/src/main/java/org/glassfish/web/deployment/node/FilterMappingNode.java	(working copy)
        @@ -141,9 +141,9 @@
                             value = trimmedUrl;
                         } else {
                             throw new IllegalArgumentException(
        -                            WebContainer.rb.getString(
        -                                    MessageFormat.format(
        -                                            ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN, value)));
        +                            MessageFormat.format(
        +                                    WebContainer.rb.getString(
        +                                            ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN), value));
                         }
                     }
                     descriptor.addURLPattern(value);
        Index: web-glue/src/main/java/org/glassfish/web/deployment/node/ServletMappingNode.java
        ===================================================================
        --- web-glue/src/main/java/org/glassfish/web/deployment/node/ServletMappingNode.java	(revision 62639)
        +++ web-glue/src/main/java/org/glassfish/web/deployment/node/ServletMappingNode.java	(working copy)
        @@ -112,9 +112,9 @@
                             value = trimmedUrl;
                         } else {
                             throw new IllegalArgumentException(
        -                            WebContainer.rb.getString(
        -                                    MessageFormat.format(
        -                                            FilterMappingNode.ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN, value)));
        +                            MessageFormat.format(
        +                                    WebContainer.rb.getString(
        +                                            FilterMappingNode.ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN), value));
                         }
                     }
         
        Index: web-naming/src/main/java/org/apache/naming/ContextBindings.java
        ===================================================================
        --- web-naming/src/main/java/org/apache/naming/ContextBindings.java	(revision 62639)
        +++ web-naming/src/main/java/org/apache/naming/ContextBindings.java	(working copy)
        @@ -223,8 +223,8 @@
                     Context context = contextNameBindings.get(name);
                     if (context == null)
                         throw new NamingException(
        -                        rb.getString(
        -                                MessageFormat.format(UNKNOWN_CONTEXT, name)));
        +                        MessageFormat.format(
        +                                rb.getString(UNKNOWN_CONTEXT), name));
                     threadBindings.put(Thread.currentThread(), context);
                     threadNameBindings.put(Thread.currentThread(), name);
                 }
        @@ -326,8 +326,8 @@
                     Context context = contextNameBindings.get(name);
                     if (context == null)
                         throw new NamingException(
        -                        rb.getString(
        -                                MessageFormat.format(UNKNOWN_CONTEXT, name)));
        +                        MessageFormat.format(
        +                                rb.getString(UNKNOWN_CONTEXT), name));
                     clBindings.put(classLoader, context);
                     clNameBindings.put(classLoader, name);
                 }
        Index: web-naming/src/main/java/org/apache/naming/resources/WARDirContext.java
        ===================================================================
        --- web-naming/src/main/java/org/apache/naming/resources/WARDirContext.java	(revision 62639)
        +++ web-naming/src/main/java/org/apache/naming/resources/WARDirContext.java	(working copy)
        @@ -215,7 +215,7 @@
                     try {
                         base.close();
                     } catch (IOException e) {
        -                String msg = MessageFormat.format(EXCEPTION_CLOSING_WAR, base.getName());
        +                String msg = MessageFormat.format(rb.getString(EXCEPTION_CLOSING_WAR), base.getName());
                         log.log(Level.WARNING, msg, e);
                     }
                 }
        Index: web-naming/src/main/java/org/apache/naming/resources/WebDirContext.java
        ===================================================================
        --- web-naming/src/main/java/org/apache/naming/resources/WebDirContext.java	(revision 62639)
        +++ web-naming/src/main/java/org/apache/naming/resources/WebDirContext.java	(working copy)
        @@ -165,7 +165,7 @@
                     jfEntry = lookupFromJars(name);
                     if (jfEntry == null) {
                         throw new NamingException
        -                    (rb.getString(MessageFormat.format(RESOURCES_NOT_FOUND, name)));
        +                    (MessageFormat.format(rb.getString(RESOURCES_NOT_FOUND), name));
                     }
                 }
         
        @@ -223,7 +223,7 @@
         
                 if (file == null && jfeEntries.size() == 0) {
                     throw new NamingException
        -                    (rb.getString(MessageFormat.format(RESOURCES_NOT_FOUND, name)));
        +                    (MessageFormat.format(rb.getString(RESOURCES_NOT_FOUND), name));
                 }
                 return new NamingContextEnumeration(namingEntries.iterator());
             }
        @@ -263,7 +263,7 @@
         
                 if (file == null && jfeEntries.size() == 0) {
                     throw new NamingException
        -                    (rb.getString(MessageFormat.format(RESOURCES_NOT_FOUND, name)));
        +                    (MessageFormat.format(rb.getString(RESOURCES_NOT_FOUND), name));
                 }
         
                 return new NamingContextBindingsEnumeration(namingEntries.iterator(),
        @@ -298,7 +298,7 @@
                     JarFileEntry jfEntry = lookupFromJars(name);
                     if (jfEntry == null) {
                         throw new NamingException
        -                    (rb.getString(MessageFormat.format(RESOURCES_NOT_FOUND, name)));
        +                    (MessageFormat.format(rb.getString(RESOURCES_NOT_FOUND), name));
                     } else {
                         return new JarResourceAttributes(jfEntry.getJarEntry());
                     }
        
        Index: web-glue/src/main/java/org/glassfish/web/deployment/node/WebResourceCollectionNode.java
        ===================================================================
        --- web-glue/src/main/java/org/glassfish/web/deployment/node/WebResourceCollectionNode.java	(revision 63724)
        +++ web-glue/src/main/java/org/glassfish/web/deployment/node/WebResourceCollectionNode.java	(working copy)
        @@ -134,9 +134,9 @@
                             value = trimmedUrl;
                         } else {
                             throw new IllegalArgumentException(
        -                            WebContainer.rb.getString(
        -                                    MessageFormat.format(
        -                                            FilterMappingNode.ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN, value)));
        +                            MessageFormat.format(
        +                                    WebContainer.rb.getString(FilterMappingNode.ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN),
        +                                    value));
                         }
                     }
                     descriptor.addUrlPattern(value);
        
        Show
        lzg5039 added a comment - - edited Hi, Shing Wai Chan I use the following source to fix all problems , can you help me to review it . Index: war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java =================================================================== --- war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java (revision 62639) +++ war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java (working copy) @@ -1258,7 +1258,7 @@ } catch(AccessControlException ace) { if (logger.isLoggable(Level.WARNING)) { String msg = MessageFormat.format( - FIND_CLASS_INTERNAL_SECURITY_EXCEPTION, + rb.getString(FIND_CLASS_INTERNAL_SECURITY_EXCEPTION), new Object[]{name, ace.getMessage()}); logger.log(Level.WARNING, msg, ace); } @@ -1705,7 +1705,7 @@ try { securityManager.checkPackageAccess(name.substring(0,i)); } catch (SecurityException se) { - String error = MessageFormat.format(SECURITY_EXCEPTION, name); + String error = MessageFormat.format(rb.getString(SECURITY_EXCEPTION), name); if (logger.isLoggable(Level.INFO)) { logger.log(Level.INFO, error, se); } Index: web-core/src/main/java/org/apache/catalina/core/StandardServer.java =================================================================== --- web-core/src/main/java/org/apache/catalina/core/StandardServer.java (revision 62639) +++ web-core/src/main/java/org/apache/catalina/core/StandardServer.java (working copy) @@ -892,7 +892,7 @@ try { oname=new ObjectName( "Catalina:type=Server"); } catch (Exception e) { - String msg = MessageFormat.format(ERROR_REGISTERING, e.toString()); + String msg = MessageFormat.format(rb.getString(ERROR_REGISTERING), e.toString()); log.log(Level.SEVERE, msg, e); } } Index: web-glue/src/main/java/org/glassfish/web/config/WebSslConfigHandler.java =================================================================== --- web-glue/src/main/java/org/glassfish/web/config/WebSslConfigHandler.java (revision 62639) +++ web-glue/src/main/java/org/glassfish/web/config/WebSslConfigHandler.java (working copy) @@ -94,9 +94,9 @@ try { if (listener == null) { report.setMessage( - WebContainer.rb.getString( - MessageFormat.format( - CREATE_SSL_HTTP_NOT_FOUND, command.listenerId))); + MessageFormat.format( + WebContainer.rb.getString( + CREATE_SSL_HTTP_NOT_FOUND), command.listenerId)); httpProtocol = command.findOrCreateProtocol(command.listenerId); } else { httpProtocol = listener.findHttpProtocol(); @@ -103,9 +103,9 @@ Ssl ssl = httpProtocol.getSsl(); if (ssl != null) { report.setMessage( - WebContainer.rb.getString( - MessageFormat.format( - CREATE_SSL_HTTP_ALREADY_EXISTS, command.listenerId))); + MessageFormat.format( + WebContainer.rb.getString( + CREATE_SSL_HTTP_ALREADY_EXISTS), command.listenerId)); report.setActionExitCode(ActionReport.ExitCode.FAILURE); return; } @@ -134,8 +134,8 @@ if (networkListener == null) { report.setMessage( - WebContainer.rb.getString( - MessageFormat.format(DELETE_SSL_HTTP_LISTENER_NOT_FOUND, command.listenerId))); + MessageFormat.format( + WebContainer.rb.getString(DELETE_SSL_HTTP_LISTENER_NOT_FOUND), command.listenerId)); report.setActionExitCode(ActionReport.ExitCode.FAILURE); return; } @@ -143,8 +143,8 @@ Protocol protocol = networkListener.findHttpProtocol(); if (protocol.getSsl() == null) { report.setMessage( - WebContainer.rb.getString( - MessageFormat.format(DELETE_SSL_ELEMENT_DOES_NOT_EXIST, command.listenerId))); + MessageFormat.format( + WebContainer.rb.getString(DELETE_SSL_ELEMENT_DOES_NOT_EXIST), command.listenerId)); report.setActionExitCode(ActionReport.ExitCode.FAILURE); return; } Index: web-glue/src/main/java/org/glassfish/web/deployment/node/FilterMappingNode.java =================================================================== --- web-glue/src/main/java/org/glassfish/web/deployment/node/FilterMappingNode.java (revision 62639) +++ web-glue/src/main/java/org/glassfish/web/deployment/node/FilterMappingNode.java (working copy) @@ -141,9 +141,9 @@ value = trimmedUrl; } else { throw new IllegalArgumentException( - WebContainer.rb.getString( - MessageFormat.format( - ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN, value))); + MessageFormat.format( + WebContainer.rb.getString( + ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN), value)); } } descriptor.addURLPattern(value); Index: web-glue/src/main/java/org/glassfish/web/deployment/node/ServletMappingNode.java =================================================================== --- web-glue/src/main/java/org/glassfish/web/deployment/node/ServletMappingNode.java (revision 62639) +++ web-glue/src/main/java/org/glassfish/web/deployment/node/ServletMappingNode.java (working copy) @@ -112,9 +112,9 @@ value = trimmedUrl; } else { throw new IllegalArgumentException( - WebContainer.rb.getString( - MessageFormat.format( - FilterMappingNode.ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN, value))); + MessageFormat.format( + WebContainer.rb.getString( + FilterMappingNode.ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN), value)); } } Index: web-naming/src/main/java/org/apache/naming/ContextBindings.java =================================================================== --- web-naming/src/main/java/org/apache/naming/ContextBindings.java (revision 62639) +++ web-naming/src/main/java/org/apache/naming/ContextBindings.java (working copy) @@ -223,8 +223,8 @@ Context context = contextNameBindings.get(name); if (context == null) throw new NamingException( - rb.getString( - MessageFormat.format(UNKNOWN_CONTEXT, name))); + MessageFormat.format( + rb.getString(UNKNOWN_CONTEXT), name)); threadBindings.put(Thread.currentThread(), context); threadNameBindings.put(Thread.currentThread(), name); } @@ -326,8 +326,8 @@ Context context = contextNameBindings.get(name); if (context == null) throw new NamingException( - rb.getString( - MessageFormat.format(UNKNOWN_CONTEXT, name))); + MessageFormat.format( + rb.getString(UNKNOWN_CONTEXT), name)); clBindings.put(classLoader, context); clNameBindings.put(classLoader, name); } Index: web-naming/src/main/java/org/apache/naming/resources/WARDirContext.java =================================================================== --- web-naming/src/main/java/org/apache/naming/resources/WARDirContext.java (revision 62639) +++ web-naming/src/main/java/org/apache/naming/resources/WARDirContext.java (working copy) @@ -215,7 +215,7 @@ try { base.close(); } catch (IOException e) { - String msg = MessageFormat.format(EXCEPTION_CLOSING_WAR, base.getName()); + String msg = MessageFormat.format(rb.getString(EXCEPTION_CLOSING_WAR), base.getName()); log.log(Level.WARNING, msg, e); } } Index: web-naming/src/main/java/org/apache/naming/resources/WebDirContext.java =================================================================== --- web-naming/src/main/java/org/apache/naming/resources/WebDirContext.java (revision 62639) +++ web-naming/src/main/java/org/apache/naming/resources/WebDirContext.java (working copy) @@ -165,7 +165,7 @@ jfEntry = lookupFromJars(name); if (jfEntry == null) { throw new NamingException - (rb.getString(MessageFormat.format(RESOURCES_NOT_FOUND, name))); + (MessageFormat.format(rb.getString(RESOURCES_NOT_FOUND), name)); } } @@ -223,7 +223,7 @@ if (file == null && jfeEntries.size() == 0) { throw new NamingException - (rb.getString(MessageFormat.format(RESOURCES_NOT_FOUND, name))); + (MessageFormat.format(rb.getString(RESOURCES_NOT_FOUND), name)); } return new NamingContextEnumeration(namingEntries.iterator()); } @@ -263,7 +263,7 @@ if (file == null && jfeEntries.size() == 0) { throw new NamingException - (rb.getString(MessageFormat.format(RESOURCES_NOT_FOUND, name))); + (MessageFormat.format(rb.getString(RESOURCES_NOT_FOUND), name)); } return new NamingContextBindingsEnumeration(namingEntries.iterator(), @@ -298,7 +298,7 @@ JarFileEntry jfEntry = lookupFromJars(name); if (jfEntry == null) { throw new NamingException - (rb.getString(MessageFormat.format(RESOURCES_NOT_FOUND, name))); + (MessageFormat.format(rb.getString(RESOURCES_NOT_FOUND), name)); } else { return new JarResourceAttributes(jfEntry.getJarEntry()); } Index: web-glue/src/main/java/org/glassfish/web/deployment/node/WebResourceCollectionNode.java =================================================================== --- web-glue/src/main/java/org/glassfish/web/deployment/node/WebResourceCollectionNode.java (revision 63724) +++ web-glue/src/main/java/org/glassfish/web/deployment/node/WebResourceCollectionNode.java (working copy) @@ -134,9 +134,9 @@ value = trimmedUrl; } else { throw new IllegalArgumentException( - WebContainer.rb.getString( - MessageFormat.format( - FilterMappingNode.ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN, value))); + MessageFormat.format( + WebContainer.rb.getString(FilterMappingNode.ENTERPRISE_DEPLOYMENT_INVALID_URL_PATTERN), + value)); } } descriptor.addUrlPattern(value);

          People

          • Assignee:
            Shing Wai Chan
            Reporter:
            mkarg
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated: