tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1222968 - in /tomcat/trunk/java/org/apache/jasper: compiler/JspDocumentParser.java compiler/JspReader.java compiler/JspUtil.java xmlparser/XMLEncodingDetector.java
Date Sat, 24 Dec 2011 13:28:34 GMT
Author: markt
Date: Sat Dec 24 13:28:33 2011
New Revision: 1222968

URL: http://svn.apache.org/viewvc?rev=1222968&view=rev
Log:
Fix a few unused code warnings in Jasper reported by Eclipse

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
    tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java
    tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java
    tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java?rev=1222968&r1=1222967&r2=1222968&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java Sat Dec 24 13:28:33
2011
@@ -167,8 +167,7 @@ class JspDocumentParser
             InputStream inStream = null;
             try {
                 inStream = JspUtil.getInputStream(path, jarFile,
-                                                  jspDocParser.ctxt,
-                                                  jspDocParser.err);
+                                                  jspDocParser.ctxt);
                 saxParser.parse(new InputSource(inStream), jspDocParser);
             } catch (EnableDTDValidationException e) {
                 saxParser = getSAXParser(true, jspDocParser);
@@ -180,8 +179,7 @@ class JspDocumentParser
                     }
                 }
                 inStream = JspUtil.getInputStream(path, jarFile,
-                                                  jspDocParser.ctxt,
-                                                  jspDocParser.err);
+                                                  jspDocParser.ctxt);
                 saxParser.parse(new InputSource(inStream), jspDocParser);
             } finally {
                 if (inStream != 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=1222968&r1=1222967&r2=1222968&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Sat Dec 24 13:28:33 2011
@@ -75,11 +75,6 @@ class JspReader {
     private int currFileId;
 
     /**
-     * Seems redundant.
-     */
-    private int size;
-
-    /**
      * The compilation context.
      */
     private JspCompilationContext context;
@@ -135,7 +130,6 @@ class JspReader {
         this.err = err;
         sourceFiles = new Vector<String>();
         currFileId = 0;
-        size = 0;
         singleFile = false;
         pushFile(fname, encoding, reader);
     }
@@ -504,8 +498,6 @@ class JspReader {
         }
 
         sourceFiles.add(file);
-        this.size++;
-
         return sourceFiles.size() - 1;
     }
 
@@ -524,7 +516,6 @@ class JspReader {
         }
 
         sourceFiles.remove(file);
-        this.size--;
         return sourceFiles.size() - 1;
     }
 

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=1222968&r1=1222967&r2=1222968&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java Sat Dec 24 13:28:33 2011
@@ -677,8 +677,7 @@ public class JspUtil {
     }
 
     public static InputStream getInputStream(String fname, JarFile jarFile,
-            JspCompilationContext ctxt, ErrorDispatcher err)
-            throws JasperException, IOException {
+            JspCompilationContext ctxt) throws IOException {
 
         InputStream in = null;
 
@@ -943,7 +942,7 @@ public class JspUtil {
             int skip) throws JasperException, IOException {
 
         InputStreamReader reader = null;
-        InputStream in = getInputStream(fname, jarFile, ctxt, err);
+        InputStream in = getInputStream(fname, jarFile, ctxt);
         for (int i = 0; i < skip; i++) {
             in.read();
         }

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java?rev=1222968&r1=1222967&r2=1222968&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java Sat Dec 24 13:28:33
2011
@@ -103,8 +103,7 @@ public class XMLEncodingDetector {
                                        ErrorDispatcher err)
         throws IOException, JasperException
     {
-        InputStream inStream = JspUtil.getInputStream(fname, jarFile, ctxt,
-                                                      err);
+        InputStream inStream = JspUtil.getInputStream(fname, jarFile, ctxt);
         XMLEncodingDetector detector = new XMLEncodingDetector();
         Object[] ret = detector.getEncoding(inStream, err);
         inStream.close();



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


Mime
View raw message