Simplify as per kkolinko's review
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 7 Jun 2011 23:56:14 +0000 (23:56 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 7 Jun 2011 23:56:14 +0000 (23:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1133204 13f79535-47bb-0310-9956-ffa450edef68

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

index dad56e3..140329f 100644 (file)
@@ -1222,13 +1222,7 @@ public class ContextConfig
         InputSource contextWebXml = getContextWebXmlSource();
         parseWebXml(contextWebXml, webXml, false);
         
-        // Assuming 0 is safe for what is required in this case
-        double webXmlVersion = 0;
-        if (webXml.getVersion() != null) {
-            webXmlVersion = Double.parseDouble(webXml.getVersion());
-        }
-        
-        if (webXmlVersion >= 3) {
+        if (webXml.getMajorVersion() >= 3) {
             // Ordering is important here
 
             // Step 1. Identify all the JARs packaged with the application