Fix string comparison - reported by Veracode
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 25 Mar 2011 09:55:29 +0000 (09:55 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 25 Mar 2011 09:55:29 +0000 (09:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1085303 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/ContextConfig.java

index 129b4a2..a638767 100644 (file)
@@ -609,7 +609,7 @@ public class ContextConfig
             
             // Add as watched resource so that cascade reload occurs if a default
             // config file is modified/added/removed
-            if (contextXml.getProtocol() == "file") {
+            if ("file".equals(contextXml.getProtocol())) {
                 context.addWatchedResource(
                         (new File(contextXml.toURI())).getAbsolutePath());
             }