You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/02/14 17:08:41 UTC
svn commit: r1446254 - in /tomcat/trunk/java/org/apache/jasper/compiler:
PageDataImpl.java PageInfo.java Parser.java
Author: markt
Date: Thu Feb 14 16:08:40 2013
New Revision: 1446254
URL: http://svn.apache.org/r1446254
Log:
UCDetector
- use final
- remove unused code
Modified:
tomcat/trunk/java/org/apache/jasper/compiler/PageDataImpl.java
tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java
tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
Modified: tomcat/trunk/java/org/apache/jasper/compiler/PageDataImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/PageDataImpl.java?rev=1446254&r1=1446253&r2=1446254&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/PageDataImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/PageDataImpl.java Thu Feb 14 16:08:40 2013
@@ -56,7 +56,7 @@ class PageDataImpl extends PageData impl
private static final Charset CHARSET_UTF8 = Charset.forName("UTF-8");
// string buffer used to build XML view
- private StringBuilder buf;
+ private final StringBuilder buf;
/**
* Constructor.
@@ -99,12 +99,12 @@ class PageDataImpl extends PageData impl
* In addition, this Visitor converts any taglib directives into xmlns:
* attributes and adds them to the jsp:root element of the XML view.
*/
- static class FirstPassVisitor
+ private static class FirstPassVisitor
extends Node.Visitor implements TagConstants {
- private Node.Root root;
- private AttributesImpl rootAttrs;
- private PageInfo pageInfo;
+ private final Node.Root root;
+ private final AttributesImpl rootAttrs;
+ private final PageInfo pageInfo;
// Prefix for the 'id' attribute
private String jspIdPrefix;
@@ -231,13 +231,13 @@ class PageDataImpl extends PageData impl
* Second-pass Visitor responsible for producing XML view and assigning
* each element a unique jsp:id attribute.
*/
- static class SecondPassVisitor extends Node.Visitor
+ private static class SecondPassVisitor extends Node.Visitor
implements TagConstants {
- private Node.Root root;
- private StringBuilder buf;
- private Compiler compiler;
- private String jspIdPrefix;
+ private final Node.Root root;
+ private final StringBuilder buf;
+ private final Compiler compiler;
+ private final String jspIdPrefix;
private boolean resetDefaultNS = false;
// Current value of jsp:id attribute
Modified: tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java?rev=1446254&r1=1446253&r2=1446254&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java Thu Feb 14 16:08:40 2013
@@ -39,19 +39,19 @@ import org.apache.jasper.JasperException
class PageInfo {
- private Vector<String> imports;
- private Map<String,Long> dependants;
+ private final Vector<String> imports;
+ private final Map<String,Long> dependants;
- private BeanRepository beanRepository;
- private Set<String> varInfoNames;
- private HashMap<String,TagLibraryInfo> taglibsMap;
- private HashMap<String, String> jspPrefixMapper;
- private HashMap<String, LinkedList<String>> xmlPrefixMapper;
- private HashMap<String, Mark> nonCustomTagPrefixMap;
- private String jspFile;
- private String defaultLanguage = "java";
+ private final BeanRepository beanRepository;
+ private final Set<String> varInfoNames;
+ private final HashMap<String,TagLibraryInfo> taglibsMap;
+ private final HashMap<String, String> jspPrefixMapper;
+ private final HashMap<String, LinkedList<String>> xmlPrefixMapper;
+ private final HashMap<String, Mark> nonCustomTagPrefixMap;
+ private final String jspFile;
+ private final String defaultLanguage = "java";
private String language;
- private String defaultExtends = Constants.JSP_SERVLET_BASE;
+ private final String defaultExtends = Constants.JSP_SERVLET_BASE;
private String xtends;
private String contentType = null;
private String session;
@@ -76,7 +76,7 @@ class PageInfo {
// JSP 2.1
private String deferredSyntaxAllowedAsLiteralValue;
private boolean deferredSyntaxAllowedAsLiteral = false;
- private ExpressionFactory expressionFactory =
+ private final ExpressionFactory expressionFactory =
ExpressionFactory.newInstance();
private String trimDirectiveWhitespacesValue;
private boolean trimDirectiveWhitespaces = false;
@@ -89,17 +89,17 @@ class PageInfo {
private boolean isJspPrefixHijacked;
// Set of all element and attribute prefixes used in this translation unit
- private HashSet<String> prefixes;
+ private final HashSet<String> prefixes;
private boolean hasJspRoot = false;
private Vector<String> includePrelude;
private Vector<String> includeCoda;
- private Vector<String> pluginDcls; // Id's for tagplugin declarations
+ private final Vector<String> pluginDcls; // Id's for tagplugin declarations
// JSP 2.2
private boolean errorOnUndeclaredNamepsace = false;
- private boolean isTagFile = false;
+ private final boolean isTagFile;
PageInfo(BeanRepository beanRepository, String jspFile, boolean isTagFile) {
this.isTagFile = isTagFile;
@@ -391,11 +391,6 @@ class PageInfo {
return (language == null && useDefault ? defaultLanguage : language);
}
- public String getLanguage() {
- return getLanguage(true);
- }
-
-
/*
* extends
*/
Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1446254&r1=1446253&r2=1446254&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Thu Feb 14 16:08:40 2013
@@ -44,25 +44,25 @@ import org.xml.sax.helpers.AttributesImp
class Parser implements TagConstants {
- private ParserController parserController;
+ private final ParserController parserController;
- private JspCompilationContext ctxt;
+ private final JspCompilationContext ctxt;
- private JspReader reader;
+ private final JspReader reader;
private Mark start;
- private ErrorDispatcher err;
+ private final ErrorDispatcher err;
private int scriptlessCount;
- private boolean isTagFile;
+ private final boolean isTagFile;
- private boolean directivesOnly;
+ private final boolean directivesOnly;
- private JarResource jarResource;
+ private final JarResource jarResource;
- private PageInfo pageInfo;
+ private final PageInfo pageInfo;
// Virtual body content types, to make parsing a little easier.
// These are not accessible from outside the parser.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org