Author: markt
Date: Wed May  2 14:54:12 2018
New Revision: 1830765

URL: http://svn.apache.org/viewvc?rev=1830765&view=rev
Log:
Use a constant for a repeatedly used String

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java?rev=1830765&r1=1830764&r2=1830765&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java Wed May 
 2 14:54:12 2018
@@ -47,6 +47,8 @@ import org.apache.tomcat.util.res.String
 public class WebAnnotationSet {
 
     private static final String SEPARATOR = "/";
+    private static final String MAPPED_NAME_PROPERTY = "mappedName";
+
 
     /**
      * The string resources for this package.
@@ -335,7 +337,7 @@ public class WebAnnotationSet {
             resource.setName(name);
             resource.setType(type);
             resource.setDescription(annotation.description());
-            resource.setProperty("mappedName", annotation.mappedName());
+            resource.setProperty(MAPPED_NAME_PROPERTY, 
annotation.mappedName());
             resource.setLookupName(annotation.lookup());
 
             context.getNamingResources().addEnvironment(resource);
@@ -376,7 +378,7 @@ public class WebAnnotationSet {
             }
 
             resource.setScope(annotation.shareable() ? "Shareable" : 
"Unshareable");
-            resource.setProperty("mappedName", annotation.mappedName());
+            resource.setProperty(MAPPED_NAME_PROPERTY, 
annotation.mappedName());
             resource.setDescription(annotation.description());
             resource.setLookupName(annotation.lookup());
 
@@ -408,7 +410,7 @@ public class WebAnnotationSet {
 
             resource.setName(name);
             resource.setType(type);
-            resource.setProperty("mappedName", annotation.mappedName());
+            resource.setProperty(MAPPED_NAME_PROPERTY, 
annotation.mappedName());
             resource.setDescription(annotation.description());
             resource.setLookupName(annotation.lookup());
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to