tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1380343 - /tomcat/trunk/java/org/apache/jasper/compiler/
Date Mon, 03 Sep 2012 20:16:02 GMT
Author: markt
Date: Mon Sep  3 20:16:01 2012
New Revision: 1380343

URL: http://svn.apache.org/viewvc?rev=1380343&view=rev
Log:
Clean-up
- Java 7 <>

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
    tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
    tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
    tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java
    tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java
    tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
    tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
    tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java
    tomcat/trunk/java/org/apache/jasper/compiler/Mark.java
    tomcat/trunk/java/org/apache/jasper/compiler/Node.java
    tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java
    tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java
    tomcat/trunk/java/org/apache/jasper/compiler/ScriptingVariabler.java
    tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java
    tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java
    tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java
    tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
    tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
    tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java
    tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java
    tomcat/trunk/java/org/apache/jasper/compiler/Validator.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java Mon Sep  3 20:16:01
2012
@@ -431,7 +431,7 @@ public class ErrorDispatcher {
                                 String errMsg, String fname, Node.Nodes page)
                 throws IOException, JasperException {
 
-        ArrayList<JavacErrorDetail> errors = new ArrayList<JavacErrorDetail>();
+        ArrayList<JavacErrorDetail> errors = new ArrayList<>();
         StringBuilder errMsgBuf = null;
         int lineNum = -1;
         JavacErrorDetail javacError = null;

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Generator.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Generator.java Mon Sep  3 20:16:01 2012
@@ -357,7 +357,7 @@ class Generator {
             private final Vector<String> vars;
 
             ScriptingVarVisitor() {
-                vars = new Vector<String>();
+                vars = new Vector<>();
             }
 
             @Override
@@ -796,10 +796,9 @@ class Generator {
             this.methodsBuffered = methodsBuffered;
             this.fragmentHelperClass = fragmentHelperClass;
             methodNesting = 0;
-            handlerInfos =
-                new Hashtable<String,Hashtable<String,TagHandlerInfo>>();
-            tagVarNumbers = new Hashtable<String,Integer>();
-            textMap = new HashMap<String,String>();
+            handlerInfos = new Hashtable<>();
+            tagVarNumbers = new Hashtable<>();
+            textMap = new HashMap<>();
         }
 
         /**
@@ -1868,7 +1867,7 @@ class Generator {
 
             // Compute attribute value string for XML-style and named
             // attributes
-            Hashtable<String,String> map = new Hashtable<String,String>();
+            Hashtable<String,String> map = new Hashtable<>();
             Node.JspAttribute[] attrs = n.getJspAttributes();
             for (int i = 0; attrs != null && i < attrs.length; i++) {
                 String value = null;
@@ -1984,7 +1983,7 @@ class Generator {
                     charArrayBuffer = new GenBuffer();
                     caOut = charArrayBuffer.getOut();
                     caOut.pushIndent();
-                    textMap = new HashMap<String,String>();
+                    textMap = new HashMap<>();
                 } else {
                     caOut = charArrayBuffer.getOut();
                 }
@@ -2199,8 +2198,7 @@ class Generator {
             Hashtable<String,TagHandlerInfo> handlerInfosByShortName =
                 handlerInfos.get(n.getPrefix());
             if (handlerInfosByShortName == null) {
-                handlerInfosByShortName =
-                    new Hashtable<String,TagHandlerInfo>();
+                handlerInfosByShortName = new Hashtable<>();
                 handlerInfos.put(n.getPrefix(), handlerInfosByShortName);
             }
             TagHandlerInfo handlerInfo =
@@ -3418,7 +3416,7 @@ class Generator {
      */
     Generator(ServletWriter out, Compiler compiler) {
         this.out = out;
-        methodsBuffered = new ArrayList<GenBuffer>();
+        methodsBuffered = new ArrayList<>();
         charArrayBuffer = null;
         err = compiler.getErrorDispatcher();
         ctxt = compiler.getCompilationContext();
@@ -3443,7 +3441,7 @@ class Generator {
         varInfoNames = pageInfo.getVarInfoNames();
         breakAtLF = ctxt.getOptions().getMappedFile();
         if (isPoolingEnabled) {
-            tagHandlerPoolNames = new Vector<String>();
+            tagHandlerPoolNames = new Vector<>();
         } else {
             tagHandlerPoolNames = null;
         }
@@ -3937,8 +3935,8 @@ class Generator {
         TagHandlerInfo(Node n, Class<?> tagHandlerClass,
                 ErrorDispatcher err) throws JasperException {
             this.tagHandlerClass = tagHandlerClass;
-            this.methodMaps = new Hashtable<String, Method>();
-            this.propertyEditorMaps = new Hashtable<String, Class<?>>();
+            this.methodMaps = new Hashtable<>();
+            this.propertyEditorMaps = new Hashtable<>();
 
             try {
                 BeanInfo tagClassInfo = Introspector
@@ -4100,7 +4098,7 @@ class Generator {
         // True if the helper class should be generated.
         private boolean used = false;
 
-        private ArrayList<Fragment> fragments = new ArrayList<Fragment>();
+        private ArrayList<Fragment> fragments = new ArrayList<>();
 
         private String className;
 

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java Mon Sep  3 20:16:01
2012
@@ -71,8 +71,8 @@ class ImplicitTagLibraryInfo extends Tag
         super(prefix, null);
         this.pc = pc;
         this.pi = pi;
-        this.tagFileMap = new Hashtable<String,String>();
-        this.vec = new Vector<TagFileInfo>();
+        this.tagFileMap = new Hashtable<>();
+        this.vec = new Vector<>();
 
         // Implicit tag libraries have no functions:
         this.functions = new FunctionInfo[0];

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java Mon Sep  3 20:16:01 2012
@@ -85,8 +85,7 @@ public class JDTCompiler extends org.apa
         final ClassLoader classLoader = ctxt.getJspLoader();
         String[] fileNames = new String[] {sourceFile};
         String[] classNames = new String[] {targetClassName};
-        final ArrayList<JavacErrorDetail> problemList =
-            new ArrayList<JavacErrorDetail>();
+        final ArrayList<JavacErrorDetail> problemList = new ArrayList<>();
 
         class CompilationUnit implements ICompilationUnit {
 
@@ -294,7 +293,7 @@ public class JDTCompiler extends org.apa
         final IErrorHandlingPolicy policy =
             DefaultErrorHandlingPolicies.proceedWithAllProblems();
 
-        final Map<String,String> settings = new HashMap<String,String>();
+        final Map<String,String> settings = new HashMap<>();
         settings.put(CompilerOptions.OPTION_LineNumberAttribute,
                      CompilerOptions.GENERATE);
         settings.put(CompilerOptions.OPTION_SourceFileAttribute,

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java Mon Sep  3 20:16:01
2012
@@ -219,7 +219,7 @@ public class JavacErrorDetail {
      */
     private String[] readFile(InputStream s) throws IOException {
         BufferedReader reader = new BufferedReader(new InputStreamReader(s));
-        List<String> lines = new ArrayList<String>();
+        List<String> lines = new ArrayList<>();
         String line;
 
         while ( (line = reader.readLine()) != null ) {

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Sep  3 20:16:01 2012
@@ -128,7 +128,7 @@ class JspReader {
 
         this.context = ctxt;
         this.err = err;
-        sourceFiles = new Vector<String>();
+        sourceFiles = new Vector<>();
         currFileId = 0;
         singleFile = false;
         pushFile(fname, encoding, reader);

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java Mon Sep  3 20:16:01
2012
@@ -162,7 +162,7 @@ public final class JspRuntimeContext {
         }
 
         if (options.getMaxLoadedJsps() > 0) {
-            jspQueue = new FastRemovalDequeue<JspServletWrapper>(options.getMaxLoadedJsps());
+            jspQueue = new FastRemovalDequeue<>(options.getMaxLoadedJsps());
             if (log.isDebugEnabled()) {
                 log.debug(Localizer.getMessage("jsp.message.jsp_queue_created",
                                                "" + options.getMaxLoadedJsps(), context.getContextPath()));
@@ -192,7 +192,7 @@ public final class JspRuntimeContext {
     /**
      * Maps JSP pages to their JspServletWrapper's
      */
-    private Map<String, JspServletWrapper> jsps = new ConcurrentHashMap<String,
JspServletWrapper>();
+    private Map<String, JspServletWrapper> jsps = new ConcurrentHashMap<>();
 
     /**
      * Keeps JSP pages ordered by last access.

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java Mon Sep  3 20:16:01 2012
@@ -119,7 +119,7 @@ public class JspUtil {
 
         // AttributesImpl.removeAttribute is broken, so we do this...
         int tempLength = (attrs == null) ? 0 : attrs.getLength();
-        Vector<String> temp = new Vector<String>(tempLength, 1);
+        Vector<String> temp = new Vector<>(tempLength, 1);
         for (int i = 0; i < tempLength; i++) {
             @SuppressWarnings("null")  // If attrs==null, tempLength == 0
             String qName = attrs.getQName(i);
@@ -796,7 +796,7 @@ public class JspUtil {
      * @return the components of the path
      */
     private static final String[] split(String path, String pat) {
-        Vector<String> comps = new Vector<String>();
+        Vector<String> comps = new Vector<>();
         int pos = path.indexOf(pat);
         int start = 0;
         while (pos >= 0) {

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Mark.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Mark.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Mark.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Mon Sep  3 20:16:01 2012
@@ -81,7 +81,7 @@ final class Mark {
         this.fileName = name;
         this.baseDir = inBaseDir;
         this.encoding = inEncoding;
-        this.includeStack = new Stack<IncludeState>();
+        this.includeStack = new Stack<>();
     }
 
 
@@ -102,7 +102,7 @@ final class Mark {
         this.encoding = other.encoding;
 
         // clone includeStack without cloning contents
-        includeStack = new Stack<IncludeState>();
+        includeStack = new Stack<>();
         for ( int i=0; i < other.includeStack.size(); i++ ) {
             includeStack.addElement( other.includeStack.elementAt(i) );
         }

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Node.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Node.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Node.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Node.java Mon Sep  3 20:16:01 2012
@@ -582,7 +582,7 @@ abstract class Node implements TagConsta
                 Mark start, Node parent) {
             super(qName, PAGE_DIRECTIVE_ACTION, attrs, nonTaglibXmlnsAttrs,
                     taglibAttrs, start, parent);
-            imports = new Vector<String>();
+            imports = new Vector<>();
         }
 
         @Override
@@ -671,7 +671,7 @@ abstract class Node implements TagConsta
                 Mark start, Node parent) {
             super(qName, TAG_DIRECTIVE_ACTION, attrs, nonTaglibXmlnsAttrs,
                     taglibAttrs, start, parent);
-            imports = new Vector<String>();
+            imports = new Vector<>();
         }
 
         @Override
@@ -2080,7 +2080,7 @@ abstract class Node implements TagConsta
          */
         public void addSmap(int srcLine) {
             if (extraSmap == null) {
-                extraSmap = new ArrayList<Integer>();
+                extraSmap = new ArrayList<>();
             }
             extraSmap.add(new Integer(srcLine));
         }
@@ -2333,12 +2333,12 @@ abstract class Node implements TagConsta
         private boolean generatedInBuffer;
 
         public Nodes() {
-            list = new Vector<Node>();
+            list = new Vector<>();
         }
 
         public Nodes(Node.Root root) {
             this.root = root;
-            list = new Vector<Node>();
+            list = new Vector<>();
             list.add(root);
         }
 

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=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java Mon Sep  3 20:16:01 2012
@@ -103,17 +103,17 @@ class PageInfo {
 
         this.jspFile = jspFile;
         this.beanRepository = beanRepository;
-        this.varInfoNames = new HashSet<String>();
-        this.taglibsMap = new HashMap<String, TagLibraryInfo>();
-        this.jspPrefixMapper = new HashMap<String, String>();
-        this.xmlPrefixMapper = new HashMap<String, LinkedList<String>>();
-        this.nonCustomTagPrefixMap = new HashMap<String, Mark>();
-        this.imports = new Vector<String>();
-        this.dependants = new HashMap<String,Long>();
-        this.includePrelude = new Vector<String>();
-        this.includeCoda = new Vector<String>();
-        this.pluginDcls = new Vector<String>();
-        this.prefixes = new HashSet<String>();
+        this.varInfoNames = new HashSet<>();
+        this.taglibsMap = new HashMap<>();
+        this.jspPrefixMapper = new HashMap<>();
+        this.xmlPrefixMapper = new HashMap<>();
+        this.nonCustomTagPrefixMap = new HashMap<>();
+        this.imports = new Vector<>();
+        this.dependants = new HashMap<>();
+        this.includePrelude = new Vector<>();
+        this.includeCoda = new Vector<>();
+        this.pluginDcls = new Vector<>();
+        this.prefixes = new HashSet<>();
 
         // Enter standard imports
         imports.addAll(Constants.STANDARD_IMPORTS);
@@ -323,7 +323,7 @@ class PageInfo {
     public void pushPrefixMapping(String prefix, String uri) {
         LinkedList<String> stack = xmlPrefixMapper.get(prefix);
         if (stack == null) {
-            stack = new LinkedList<String>();
+            stack = new LinkedList<>();
             xmlPrefixMapper.put(prefix, stack);
         }
         stack.addFirst(uri);

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Mon Sep  3 20:16:01
2012
@@ -57,7 +57,7 @@ class ParserController implements TagCon
      * A stack to keep track of the 'current base directory'
      * for include directives that refer to relative paths.
      */
-    private Stack<String> baseDirStack = new Stack<String>();
+    private Stack<String> baseDirStack = new Stack<>();
 
     private boolean isEncodingSpecifiedInProlog;
     private boolean isBomPresent;

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ScriptingVariabler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ScriptingVariabler.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/ScriptingVariabler.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ScriptingVariabler.java Mon Sep  3 20:16:01
2012
@@ -69,7 +69,7 @@ class ScriptingVariabler {
 
         public ScriptingVariableVisitor(ErrorDispatcher err) {
             this.err = err;
-            scriptVars = new HashMap<String,Integer>();
+            scriptVars = new HashMap<>();
         }
 
         @Override
@@ -89,7 +89,7 @@ class ScriptingVariabler {
                 return;
             }
 
-            List<Object> vec = new ArrayList<Object>();
+            List<Object> vec = new ArrayList<>();
 
             Integer ownRange = null;
             Node.CustomTag parent = n.getCustomTagParent();

Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java Mon Sep  3 20:16:01 2012
@@ -47,8 +47,8 @@ public class SmapGenerator {
 
     private String outputFileName;
     private String defaultStratum = "Java";
-    private List<SmapStratum> strata = new ArrayList<SmapStratum>();
-    private List<String> embedded = new ArrayList<String>();
+    private List<SmapStratum> strata = new ArrayList<>();
+    private List<String> embedded = new ArrayList<>();
     private boolean doEmbedded = true;
 
     //*********************************************************************

Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java Mon Sep  3 20:16:01 2012
@@ -132,9 +132,9 @@ public class SmapStratum {
      */
     public SmapStratum(String stratumName) {
         this.stratumName = stratumName;
-        fileNameList = new ArrayList<String>();
-        filePathList = new ArrayList<String>();
-        lineData = new ArrayList<LineInfo>();
+        fileNameList = new ArrayList<>();
+        filePathList = new ArrayList<>();
+        lineData = new ArrayList<>();
         lastFileID = 0;
     }
 

Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java Mon Sep  3 20:16:01 2012
@@ -684,7 +684,7 @@ public class SmapUtil {
 
     private static class PreScanVisitor extends Node.Visitor {
 
-        HashMap<String, SmapStratum> map = new HashMap<String, SmapStratum>();
+        HashMap<String, SmapStratum> map = new HashMap<>();
 
         @Override
         public void doVisit(Node n) {

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java Mon Sep  3 20:16:01
2012
@@ -129,11 +129,9 @@ class TagFileProcessor {
 
         private static final String TAG_DYNAMIC = "the dynamic-attributes attribute of the
tag directive";
 
-        private HashMap<String,NameEntry> nameTable =
-            new HashMap<String,NameEntry>();
+        private HashMap<String,NameEntry> nameTable = new HashMap<>();
 
-        private HashMap<String,NameEntry> nameFromTable =
-            new HashMap<String,NameEntry>();
+        private HashMap<String,NameEntry> nameFromTable = new HashMap<>();
 
         public TagFileDirectiveVisitor(Compiler compiler,
                 TagLibraryInfo tagLibInfo, String name, String path) {
@@ -141,8 +139,8 @@ class TagFileProcessor {
             this.tagLibInfo = tagLibInfo;
             this.name = name;
             this.path = path;
-            attributeVector = new Vector<TagAttributeInfo>();
-            variableVector = new Vector<TagVariableInfo>();
+            attributeVector = new Vector<>();
+            variableVector = new Vector<>();
         }
 
         @Override
@@ -669,7 +667,7 @@ class TagFileProcessor {
     public void loadTagFiles(Compiler compiler, Node.Nodes page)
             throws JasperException {
 
-        tempVector = new Vector<Compiler>();
+        tempVector = new Vector<>();
         page.visit(new TagFileLoaderVisitor(compiler));
     }
 

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Mon Sep  3 20:16:01
2012
@@ -208,9 +208,9 @@ class TagLibraryInfoImpl extends TagLibr
      */
     private void parseTLD(String uri, InputStream in, JarResource jarResource)
             throws JasperException {
-        Vector<TagInfo> tagVector = new Vector<TagInfo>();
-        Vector<TagFileInfo> tagFileVector = new Vector<TagFileInfo>();
-        Hashtable<String, FunctionInfo> functionTable = new Hashtable<String, FunctionInfo>();
+        Vector<TagInfo> tagVector = new Vector<>();
+        Vector<TagFileInfo> tagFileVector = new Vector<>();
+        Hashtable<String, FunctionInfo> functionTable = new Hashtable<>();
 
         // Create an iterator over the child elements of our <taglib> element
         ParserUtils pu = new ParserUtils();
@@ -351,8 +351,8 @@ class TagLibraryInfoImpl extends TagLibr
         String largeIcon = null;
         boolean dynamicAttributes = false;
 
-        Vector<TagAttributeInfo> attributeVector = new Vector<TagAttributeInfo>();
-        Vector<TagVariableInfo> variableVector = new Vector<TagVariableInfo>();
+        Vector<TagAttributeInfo> attributeVector = new Vector<>();
+        Vector<TagVariableInfo> variableVector = new Vector<>();
         Iterator<TreeNode> list = elem.findChildren();
         while (list.hasNext()) {
             TreeNode element = list.next();
@@ -631,7 +631,7 @@ class TagLibraryInfoImpl extends TagLibr
             throws JasperException {
 
         String validatorClass = null;
-        Map<String,Object> initParams = new Hashtable<String,Object>();
+        Map<String,Object> initParams = new Hashtable<>();
 
         Iterator<TreeNode> list = elem.findChildren();
         while (list.hasNext()) {

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java Mon Sep  3 20:16:01
2012
@@ -88,7 +88,7 @@ public class TagPluginManager {
                          TAG_PLUGINS_ROOT_ELEM);
         }
 
-        tagPlugins = new HashMap<String, TagPlugin>();
+        tagPlugins = new HashMap<>();
         Iterator<TreeNode> pluginList = root.findChildren("tag-plugin");
         while (pluginList.hasNext()) {
             TreeNode pluginNode = pluginList.next();
@@ -151,7 +151,7 @@ public class TagPluginManager {
             curNodes = new Node.Nodes();
             n.setAtSTag(curNodes);
             n.setUseTagPlugin(true);
-            pluginAttributes = new HashMap<String, Object>();
+            pluginAttributes = new HashMap<>();
         }
 
         @Override

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java Mon Sep  3 20:16:01
2012
@@ -162,7 +162,7 @@ public class TldLocationsCache {
      */
     public TldLocationsCache(ServletContext ctxt) {
         this.ctxt = ctxt;
-        mappings = new Hashtable<String, TldLocation>();
+        mappings = new Hashtable<>();
         initialized = false;
     }
 

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Validator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Validator.java?rev=1380343&r1=1380342&r2=1380343&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Validator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Validator.java Mon Sep  3 20:16:01 2012
@@ -870,7 +870,7 @@ class Validator {
             if (jspAttrsSize > 0) {
                 jspAttrs = new Node.JspAttribute[jspAttrsSize];
             }
-            Hashtable<String, Object> tagDataAttrs = new Hashtable<String, Object>(attrsSize);
+            Hashtable<String, Object> tagDataAttrs = new Hashtable<>(attrsSize);
 
             checkXmlAttributes(n, jspAttrs, tagDataAttrs);
             checkNamedAttributes(n, jspAttrs, attrsSize, tagDataAttrs);
@@ -1611,7 +1611,7 @@ class Validator {
                 throws JasperException {
             FunctionInfo funcInfo = func.getFunctionInfo();
             String signature = funcInfo.getFunctionSignature();
-            ArrayList<String> params = new ArrayList<String>();
+            ArrayList<String> params = new ArrayList<>();
             // Signature is of the form
             // <return-type> S <method-name S? '('
             // < <arg-type> ( ',' <arg-type> )* )? ')'
@@ -1644,7 +1644,7 @@ class Validator {
 
             class ValidateFunctionMapper extends FunctionMapper {
 
-                private HashMap<String, Method> fnmap = new HashMap<String, Method>();
+                private HashMap<String, Method> fnmap = new HashMap<>();
 
                 public void mapFunction(String fnQName, Method method) {
                     fnmap.put(fnQName, method);



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


Mime
View raw message