From 1d85de11649c166e0ecb16ac25ac54b35385a50b Mon Sep 17 00:00:00 2001 From: remm Date: Tue, 19 Sep 2006 10:43:54 +0000 Subject: [PATCH] - Fix spelling. - Fix getVersion method. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@447804 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/jasper/compiler/Compiler.java | 4 +- java/org/apache/jasper/compiler/JspConfig.java | 51 +++++++++++++------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/java/org/apache/jasper/compiler/Compiler.java b/java/org/apache/jasper/compiler/Compiler.java index ddd816e16..a8c4c6eb7 100644 --- a/java/org/apache/jasper/compiler/Compiler.java +++ b/java/org/apache/jasper/compiler/Compiler.java @@ -129,9 +129,9 @@ public abstract class Compiler { if (jspProperty.getIncludeCoda() != null) { pageInfo.setIncludeCoda(jspProperty.getIncludeCoda()); } - if (jspProperty.isDefferedSyntaxAllowedAsLitteral() != null) { + if (jspProperty.isDeferedSyntaxAllowedAsLitteral() != null) { pageInfo.setDeferredSyntaxAllowedAsLiteral(JspUtil.booleanValue(jspProperty - .isDefferedSyntaxAllowedAsLitteral())); + .isDeferedSyntaxAllowedAsLitteral())); } if (jspProperty.isTrimDirectiveWhitespaces() != null) { pageInfo.setTrimDirectiveWhitespaces(JspUtil.booleanValue(jspProperty diff --git a/java/org/apache/jasper/compiler/JspConfig.java b/java/org/apache/jasper/compiler/JspConfig.java index 0696d816b..aa41438c9 100644 --- a/java/org/apache/jasper/compiler/JspConfig.java +++ b/java/org/apache/jasper/compiler/JspConfig.java @@ -52,7 +52,7 @@ public class JspConfig { private String defaultIsXml = null; // unspecified private String defaultIsELIgnored = null; // unspecified private String defaultIsScriptingInvalid = null; - private String defaultDefferedSyntaxAllowedAsLitteral = null; + private String defaultDeferedSyntaxAllowedAsLitteral = null; private String defaultTrimDirectiveWhitespaces = null; private JspProperty defaultJspProperty; @@ -61,15 +61,14 @@ public class JspConfig { } private double getVersion(TreeNode webApp) { - if (webApp == null) { - String v = webApp.findAttribute("version"); - if (v != null) { - try { - return Double.parseDouble(v); - } catch (Exception e) {} + String v = webApp.findAttribute("version"); + if (v != null) { + try { + return Double.parseDouble(v); + } catch (NumberFormatException e) { } } - return 2.4; + return 2.3; } private void processWebDotXml(ServletContext ctxt) throws JasperException { @@ -114,7 +113,7 @@ public class JspConfig { String isXml = null; Vector includePrelude = new Vector(); Vector includeCoda = new Vector(); - String defferedSyntaxAllowedAsLitteral = null; + String deferedSyntaxAllowedAsLitteral = null; String trimDirectiveWhitespaces = null; while (list.hasNext()) { @@ -137,7 +136,7 @@ public class JspConfig { else if ("include-coda".equals(tname)) includeCoda.addElement(element.getBody()); else if ("deferred-syntax-allowed-as-literal".equals(tname)) - defferedSyntaxAllowedAsLitteral = element.getBody(); + deferedSyntaxAllowedAsLitteral = element.getBody(); else if ("trim-directive-whitespaces".equals(tname)) trimDirectiveWhitespaces = element.getBody(); } @@ -195,7 +194,7 @@ public class JspConfig { pageEncoding, includePrelude, includeCoda, - defferedSyntaxAllowedAsLitteral, + deferedSyntaxAllowedAsLitteral, trimDirectiveWhitespaces); JspPropertyGroup propertyGroup = new JspPropertyGroup(path, extension, property); @@ -221,7 +220,7 @@ public class JspConfig { defaultJspProperty = new JspProperty(defaultIsXml, defaultIsELIgnored, defaultIsScriptingInvalid, - null, null, null, defaultDefferedSyntaxAllowedAsLitteral, + null, null, null, defaultDeferedSyntaxAllowedAsLitteral, defaultTrimDirectiveWhitespaces); initialized = true; } @@ -296,7 +295,7 @@ public class JspConfig { JspPropertyGroup elIgnoredMatch = null; JspPropertyGroup scriptingInvalidMatch = null; JspPropertyGroup pageEncodingMatch = null; - JspPropertyGroup defferedSyntaxAllowedAsLitteralMatch = null; + JspPropertyGroup deferedSyntaxAllowedAsLitteralMatch = null; JspPropertyGroup trimDirectiveWhitespacesMatch = null; Iterator iter = jspProperties.iterator(); @@ -352,9 +351,9 @@ public class JspConfig { if (jp.getPageEncoding() != null) { pageEncodingMatch = selectProperty(pageEncodingMatch, jpg); } - if (jp.isDefferedSyntaxAllowedAsLitteral() != null) { - defferedSyntaxAllowedAsLitteralMatch = - selectProperty(defferedSyntaxAllowedAsLitteralMatch, jpg); + if (jp.isDeferedSyntaxAllowedAsLitteral() != null) { + deferedSyntaxAllowedAsLitteralMatch = + selectProperty(deferedSyntaxAllowedAsLitteralMatch, jpg); } if (jp.isTrimDirectiveWhitespaces() != null) { trimDirectiveWhitespacesMatch = @@ -367,7 +366,7 @@ public class JspConfig { String isELIgnored = defaultIsELIgnored; String isScriptingInvalid = defaultIsScriptingInvalid; String pageEncoding = null; - String isDefferedSyntaxAllowedAsLitteral = defaultDefferedSyntaxAllowedAsLitteral; + String isDeferedSyntaxAllowedAsLitteral = defaultDeferedSyntaxAllowedAsLitteral; String isTrimDirectiveWhitespaces = defaultTrimDirectiveWhitespaces; if (isXmlMatch != null) { @@ -383,9 +382,9 @@ public class JspConfig { if (pageEncodingMatch != null) { pageEncoding = pageEncodingMatch.getJspProperty().getPageEncoding(); } - if (defferedSyntaxAllowedAsLitteralMatch != null) { - isDefferedSyntaxAllowedAsLitteral = - defferedSyntaxAllowedAsLitteralMatch.getJspProperty().isDefferedSyntaxAllowedAsLitteral(); + if (deferedSyntaxAllowedAsLitteralMatch != null) { + isDeferedSyntaxAllowedAsLitteral = + deferedSyntaxAllowedAsLitteralMatch.getJspProperty().isDeferedSyntaxAllowedAsLitteral(); } if (trimDirectiveWhitespacesMatch != null) { isTrimDirectiveWhitespaces = @@ -394,7 +393,7 @@ public class JspConfig { return new JspProperty(isXml, isELIgnored, isScriptingInvalid, pageEncoding, includePreludes, includeCodas, - isDefferedSyntaxAllowedAsLitteral, isTrimDirectiveWhitespaces); + isDeferedSyntaxAllowedAsLitteral, isTrimDirectiveWhitespaces); } /** @@ -477,13 +476,13 @@ public class JspConfig { private String pageEncoding; private Vector includePrelude; private Vector includeCoda; - private String defferedSyntaxAllowedAsLitteral; + private String deferedSyntaxAllowedAsLitteral; private String trimDirectiveWhitespaces; public JspProperty(String isXml, String elIgnored, String scriptingInvalid, String pageEncoding, Vector includePrelude, Vector includeCoda, - String defferedSyntaxAllowedAsLitteral, + String deferedSyntaxAllowedAsLitteral, String trimDirectiveWhitespaces) { this.isXml = isXml; @@ -492,7 +491,7 @@ public class JspConfig { this.pageEncoding = pageEncoding; this.includePrelude = includePrelude; this.includeCoda = includeCoda; - this.defferedSyntaxAllowedAsLitteral = defferedSyntaxAllowedAsLitteral; + this.deferedSyntaxAllowedAsLitteral = deferedSyntaxAllowedAsLitteral; this.trimDirectiveWhitespaces = trimDirectiveWhitespaces; } @@ -520,8 +519,8 @@ public class JspConfig { return includeCoda; } - public String isDefferedSyntaxAllowedAsLitteral() { - return defferedSyntaxAllowedAsLitteral; + public String isDeferedSyntaxAllowedAsLitteral() { + return deferedSyntaxAllowedAsLitteral; } public String isTrimDirectiveWhitespaces() { -- 2.11.0