[GUMP@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) failed

2012-10-13 Thread Gump
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-taglibs-standard has an issue affecting its community 
integration.
This issue affects 2 projects,
 and has been outstanding for 127 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-taglibs-standard :  Standard Taglib
- tomcat-taglibs-standard-install :  JSP Taglibs


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Optional dependency httpunit failed with reason build failed
 -DEBUG- (Apache Gump generated) Apache Maven Settings in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/pom.xml
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/gump_work/build_tomcat-taglibs_tomcat-taglibs-standard.html
Work Name: build_tomcat-taglibs_tomcat-taglibs-standard (Type: Build)
Work ended in a state of : Failed
Elapsed: 23 secs
Command Line: /opt/maven2/bin/mvn --batch-mode -DskipTests=true --settings 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml 
install 
[Working Directory: /srv/gump/public/workspace/tomcat-taglibs/standard]
M2_HOME: /opt/maven2
-
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[debug] execute contextualize
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/test/resources
[INFO] Copying 3 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [bundle:bundle {execution: default-bundle}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/taglibs-standard-spec-1.2-SNAPSHOT.jar
 to 
/srv/gump/public/workspace/mvnlocalrepo/shared/org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] [bundle:install {execution: default-install}]
[INFO] Parsing 
file:/srv/gump/public/workspace/mvnlocalrepo/shared/repository.xml
[INFO] Installing 
org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] 
[INFO] Building JSTL Implementation
[INFO]task-segment: [install]
[INFO] 
[INFO] [remote-resources:process {execution: default}]
[INFO] snapshot org.apache.taglibs:taglibs-standard-spec:1.2-SNAPSHOT: checking 
for updates from apache.snapshots
[debug] execute contextualize
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 96 source files to 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/target/classes
[INFO] -
[ERROR] COMPILATION ERROR : 
[INFO] -
[ERROR] 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource
[INFO] 1 error
[INFO] -
[INFO] 
[ERROR] BUILD FAILURE
[INFO] 
[INFO] Compilation failure
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource

[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] --

Re: Buidlbot for trunk (was: Re: svn commit: r1397390)

2012-10-13 Thread Konstantin Kolinko
2012/10/12 Mark Thomas :
> On 12/10/2012 09:01, Konstantin Kolinko wrote:
>> 2012/10/12 Mark Thomas :
>>> On 12/10/2012 01:21, ma...@apache.org wrote:
 Author: markt
 Date: Fri Oct 12 00:21:23 2012
 New Revision: 1397390

 URL: http://svn.apache.org/viewvc?rev=1397390&view=rev
 Log:
 Fix Eclipse Javadoc warning
>>>
>>> This commit is primarily to test buildbot as it now has Java 7 available
>>> and without Java 7, trunk builds have been failing.
>>>
>>
>> Congratulations - Buildbot is working now.
>> The trunk build for r1397390 compiled successfully - first time is
>> several months.
>>
>> But it failed when running tests.
>>
>> There is only 1 failure there:
>> Test org.apache.tomcat.util.net.TestSsl FAILED  (for NIO)
>
> I see the same problem on a Linux VM but not on Windows. Need to find
> some time to dig into this.
>

http://ci.apache.org/projects/tomcat/tomcat8/logs/1397390/TEST-org.apache.catalina.util.TestServerInfo.NIO.txt

Architecture:   amd64
JVM Version:1.7.0_07-b10
JVM Vendor: Oracle Corporation

JDK 7u7. Nothing exotic there...

Maybe some test could dump the cipher suites list, if that is what is
different between configurations.

Best regards,
Konstantin Kolinko

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



Re: svn commit: r1397291 - in /tomcat/trunk/java/javax/servlet/http: HttpServletRequest.java HttpServletRequestWrapper.java ProtocolHandler.java WebConnection.java

2012-10-13 Thread Konstantin Kolinko
2012/10/12 Mark Thomas :
> On 12/10/2012 08:54, Konstantin Kolinko wrote:
>> 2012/10/12  :
>>> Author: markt
>>> Date: Thu Oct 11 20:29:01 2012
>>> New Revision: 1397291
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1397291&view=rev
>>> Log:
>>> Fill in some of the HTTP upgrade Javadoc
>>>
>>> Modified:
>>> tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java
>>> tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java
>>> tomcat/trunk/java/javax/servlet/http/ProtocolHandler.java
>>> tomcat/trunk/java/javax/servlet/http/WebConnection.java
>>>
>>
>>>
>>>  /**
>>> - * TODO SERVLET 3.1
>>> + * Start the HTTP upgrade process and pass the connection to the 
>>> provided
>>> + * protocol handler once the current request/response pair has 
>>> completed
>>> + * processing.
>>>   */
>>> -public abstract void upgrade(javax.servlet.http.ProtocolHandler 
>>> handler)
>>> -throws java.io.IOException;
>>> +public void upgrade(ProtocolHandler handler) throws 
>>> java.io.IOException;
>>
>> It would be better to mark such new API as "@since Servlet 3.1"
>
> Agreed. I've done this and cleaned up / filled-in the Servlet 3.0 and
> Servlet 3.1 Javadoc for those classes. There is a fair amount of
> clean-up required in the Javadoc. I'm aiming to fix these as I touch the
> classes / have a spare 5 minutes to fill.
>

Looks good. Thank you.

Best regards,
Konstantin Kolinko

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



Re: svn commit: r1397476 - in /tomcat/tc7.0.x/trunk: ./ java/javax/servlet/http/HttpServlet.java java/javax/servlet/http/HttpServletRequest.java

2012-10-13 Thread Konstantin Kolinko
2012/10/12  :
> Author: markt
> Date: Fri Oct 12 08:56:58 2012
> New Revision: 1397476
>
> URL: http://svn.apache.org/viewvc?rev=1397476&view=rev
> Log:
> Fix a long standing TODO so correct exceptions are thrown.
> Clean-up Javadoc.
>
> Modified:
> tomcat/tc7.0.x/trunk/   (props changed)
> tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java
> tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletRequest.java
>
> Propchange: tomcat/tc7.0.x/trunk/
> --
>   Merged /tomcat/trunk:r1397464,1397466,1397472
>
> Modified: tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java?rev=1397476&r1=1397475&r2=1397476&view=diff
> ==
> --- tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java (original)
> +++ tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java Fri Oct 12 
> 08:56:58 2012
> @@ -837,14 +837,21 @@ class NoBodyOutputStream extends Servlet
>
>  @Override
>  public void write(byte buf[], int offset, int len) throws IOException {
> -if (len >= 0) {
> -contentLength += len;
> -} else {
> -// XXX
> -// isn't this really an IllegalArgumentException?
> +if (buf == null) {
> +throw new NullPointerException(
> +lStrings.getString("err.io.nullArray"));
> +}
>
> -String msg = lStrings.getString("err.io.negativelength");
> -throw new IOException(msg);
> +if (offset < 0 || len < 0 || offset+len < buf.length) {

Two errors:
1. The above condition should be "offset+len > buf.length"

This went undetected by the test suite: none of the tests on the
buildbot are failing (besides the TestSsl x NIO one).  Well, usually
offset==0 and len==buf.length, so it is no wonder.

> +String msg = lStrings.getString("err.io.indexOutOfBounds");
> +Object[] msgArgs = new Object[3];
> +msgArgs[0] = Integer.valueOf(offset);
> +msgArgs[1] = Integer.valueOf(len);
> +msgArgs[2] = Integer.valueOf(offset + len);

2. The above value for [2] should be Integer.valueOf(buf.length), as
the message pattern says:

err.io.indexOutOfBounds=Invalid offset [{0}] and / or length [{1}]
specified for array of size [{2}]

> +msg = MessageFormat.format(msg, msgArgs);
> +throw new IndexOutOfBoundsException(msg);
>  }
> +
> +contentLength += len;
>  }
>  }
>

Best regards,
Konstantin Kolinko

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



svn commit: r1397839 - /tomcat/trunk/java/javax/servlet/http/HttpServlet.java

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 14:30:39 2012
New Revision: 1397839

URL: http://svn.apache.org/viewvc?rev=1397839&view=rev
Log:
Fix my errors. Reviewed by kkolinko

Modified:
tomcat/trunk/java/javax/servlet/http/HttpServlet.java

Modified: tomcat/trunk/java/javax/servlet/http/HttpServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServlet.java?rev=1397839&r1=1397838&r2=1397839&view=diff
==
--- tomcat/trunk/java/javax/servlet/http/HttpServlet.java (original)
+++ tomcat/trunk/java/javax/servlet/http/HttpServlet.java Sat Oct 13 14:30:39 
2012
@@ -848,12 +848,12 @@ class NoBodyOutputStream extends Servlet
 lStrings.getString("err.io.nullArray"));
 }
 
-if (offset < 0 || len < 0 || offset+len < buf.length) {
+if (offset < 0 || len < 0 || offset+len > buf.length) {
 String msg = lStrings.getString("err.io.indexOutOfBounds");
 Object[] msgArgs = new Object[3];
 msgArgs[0] = Integer.valueOf(offset);
 msgArgs[1] = Integer.valueOf(len);
-msgArgs[2] = Integer.valueOf(offset + len);
+msgArgs[2] = Integer.valueOf(buf.length);
 msg = MessageFormat.format(msg, msgArgs);
 throw new IndexOutOfBoundsException(msg);
 }



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



svn commit: r1397840 - in /tomcat/tc7.0.x/trunk: ./ java/javax/servlet/http/HttpServlet.java

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 14:31:58 2012
New Revision: 1397840

URL: http://svn.apache.org/viewvc?rev=1397840&view=rev
Log:
Fix my errors. Reviewed by kkolinko

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1397839

Modified: tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java?rev=1397840&r1=1397839&r2=1397840&view=diff
==
--- tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java (original)
+++ tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServlet.java Sat Oct 13 
14:31:58 2012
@@ -842,12 +842,12 @@ class NoBodyOutputStream extends Servlet
 lStrings.getString("err.io.nullArray"));
 }
 
-if (offset < 0 || len < 0 || offset+len < buf.length) {
+if (offset < 0 || len < 0 || offset+len > buf.length) {
 String msg = lStrings.getString("err.io.indexOutOfBounds");
 Object[] msgArgs = new Object[3];
 msgArgs[0] = Integer.valueOf(offset);
 msgArgs[1] = Integer.valueOf(len);
-msgArgs[2] = Integer.valueOf(offset + len);
+msgArgs[2] = Integer.valueOf(buf.length);
 msg = MessageFormat.format(msg, msgArgs);
 throw new IndexOutOfBoundsException(msg);
 }



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



Re: Buidlbot for trunk (was: Re: svn commit: r1397390)

2012-10-13 Thread Mark Thomas
On 13/10/2012 12:45, Konstantin Kolinko wrote:

> http://ci.apache.org/projects/tomcat/tomcat8/logs/1397390/TEST-org.apache.catalina.util.TestServerInfo.NIO.txt
> 
> Architecture:   amd64
> JVM Version:1.7.0_07-b10
> JVM Vendor: Oracle Corporation
> 
> JDK 7u7. Nothing exotic there...
> 
> Maybe some test could dump the cipher suites list, if that is what is
> different between configurations.

The renegotiation part is fine. The exception is and the end of the
request body. Not sure why yet...

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



svn commit: r1397861 - /tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 15:37:25 2012
New Revision: 1397861

URL: http://svn.apache.org/viewvc?rev=1397861&view=rev
Log:
A clean close by the server appears to result in a reset being seen by the 
client on Linux for this test case. A similar error is not seen on Windows (or 
when the test is simulated with a Linux server and a Windows client). Catch and 
swallow the exception to allow the test to pass.

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java?rev=1397861&r1=1397860&r2=1397861&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java Sat Oct 13 
15:37:25 2012
@@ -171,8 +171,8 @@ public class TestSsl extends TomcatBaseT
 SSLContext sslCtx = SSLContext.getInstance("TLS");
 sslCtx.init(null, TesterSupport.getTrustManagers(), null);
 SSLSocketFactory socketFactory = sslCtx.getSocketFactory();
-SSLSocket socket = (SSLSocket) socketFactory.createSocket("localhost",
-getPort());
+SSLSocket socket = (SSLSocket) 
socketFactory.createSocket("linux6405.dev.local",
+8443);
 
 OutputStream os = socket.getOutputStream();
 
@@ -182,7 +182,7 @@ public class TestSsl extends TomcatBaseT
 socket.startHandshake();
 
 try {
-os.write("Host: localhost\n\n".getBytes());
+os.write("Host: linux6405.dev.local:8443\n\n".getBytes());
 } catch (IOException ex) {
 ex.printStackTrace();
 fail("Re-negotiation failed");
@@ -193,8 +193,14 @@ public class TestSsl extends TomcatBaseT
 BufferedReader br = new BufferedReader(r);
 String line = br.readLine();
 while (line != null) {
-// For testing System.out.println(line);
-line = br.readLine();
+System.out.println(line);
+// Linux clients see a Connection Reset in some circumstances and a
+// clean close in others.
+try {
+line = br.readLine();
+} catch (IOException ioe) {
+line = null;
+}
 }
 }
 



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



svn commit: r1397862 - /tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 15:39:38 2012
New Revision: 1397862

URL: http://svn.apache.org/viewvc?rev=1397862&view=rev
Log:
Grr. Remove local env changes for testing

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java?rev=1397862&r1=1397861&r2=1397862&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java Sat Oct 13 
15:39:38 2012
@@ -171,8 +171,8 @@ public class TestSsl extends TomcatBaseT
 SSLContext sslCtx = SSLContext.getInstance("TLS");
 sslCtx.init(null, TesterSupport.getTrustManagers(), null);
 SSLSocketFactory socketFactory = sslCtx.getSocketFactory();
-SSLSocket socket = (SSLSocket) 
socketFactory.createSocket("linux6405.dev.local",
-8443);
+SSLSocket socket = (SSLSocket) socketFactory.createSocket("localhost",
+getPort());
 
 OutputStream os = socket.getOutputStream();
 
@@ -182,7 +182,7 @@ public class TestSsl extends TomcatBaseT
 socket.startHandshake();
 
 try {
-os.write("Host: linux6405.dev.local:8443\n\n".getBytes());
+os.write("Host: localhost\n\n".getBytes());
 } catch (IOException ex) {
 ex.printStackTrace();
 fail("Re-negotiation failed");



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



svn commit: r1397868 - /tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 15:56:21 2012
New Revision: 1397868

URL: http://svn.apache.org/viewvc?rev=1397868&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53993
Avoid NPE when the session is invalidated

Modified:
tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1397868&r1=1397867&r2=1397868&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Sat Oct 13 
15:56:21 2012
@@ -46,6 +46,7 @@ import org.apache.catalina.AccessLog;
 import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleState;
+import org.apache.catalina.Session;
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
 import org.apache.coyote.RequestInfo;
@@ -1860,15 +1861,15 @@ public class AccessLogValve extends Valv
 @Override
 public void addElement(CharArrayWriter buf, Date date, Request request,
 Response response, long time) {
-if (request != null) {
-if (request.getSession(false) != null) {
-buf.append(request.getSessionInternal(false)
-.getIdInternal());
-} else {
+if (request == null) {
+buf.append('-');
+} else {
+Session session = request.getSessionInternal(false);
+if (session == null) {
 buf.append('-');
+} else {
+buf.append(session.getIdInternal());
 }
-} else {
-buf.append('-');
 }
 }
 }



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



svn commit: r1397870 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/AccessLogValve.java webapps/docs/changelog.xml

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 16:00:11 2012
New Revision: 1397870

URL: http://svn.apache.org/viewvc?rev=1397870&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53993
Avoid NPE when the session is invalidated

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1397868

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1397870&r1=1397869&r2=1397870&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java 
Sat Oct 13 16:00:11 2012
@@ -44,6 +44,7 @@ import org.apache.catalina.AccessLog;
 import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleState;
+import org.apache.catalina.Session;
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
 import org.apache.coyote.RequestInfo;
@@ -1728,15 +1729,15 @@ public class AccessLogValve extends Valv
 @Override
 public void addElement(StringBuilder buf, Date date, Request request,
 Response response, long time) {
-if (request != null) {
-if (request.getSession(false) != null) {
-buf.append(request.getSessionInternal(false)
-.getIdInternal());
-} else {
+if (request == null) {
+buf.append('-');
+} else {
+Session session = request.getSessionInternal(false);
+if (session == null) {
 buf.append('-');
+} else {
+buf.append(session.getIdInternal());
 }
-} else {
-buf.append('-');
 }
 }
 }

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1397870&r1=1397869&r2=1397870&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Oct 13 16:00:11 2012
@@ -54,6 +54,14 @@
   issues to not "pop up" wrt. others).
 -->
 
+  
+
+  
+53993: Avoid a possible NPE in the AccessLogValve when the
+session ID is logged and a session is invalidated. (markt)
+  
+
+  
   
 
   



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



[Bug 53993] NPE in AccessLogValve

2012-10-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53993

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
Thanks for the report. Fixed in trunk and 7.0.x and will be included in 7.0.33
onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1397873 - in /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool: DataSourceProxy.java JdbcInterceptor.java PooledConnection.java

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 16:04:33 2012
New Revision: 1397873

URL: http://svn.apache.org/viewvc?rev=1397873&view=rev
Log:
Fix some Eclipse / Javadoc warnings

Modified:

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=1397873&r1=1397872&r2=1397873&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
 Sat Oct 13 16:04:33 2012
@@ -211,7 +211,7 @@ public class DataSourceProxy implements 
 }
 }
 
-public int getPoolSize() throws SQLException{
+public int getPoolSize() {
 final ConnectionPool p = pool;
 if (p == null) return 0;
 else return p.getSize();
@@ -1296,9 +1296,6 @@ public class DataSourceProxy implements 
 
getPoolProperties().setPropagateInterruptState(propagateInterruptState);
 }
 
-/**
- * {@inheritDoc}
- */
 public void purge()  {
 try {
 createPool().purge();
@@ -1307,9 +1304,6 @@ public class DataSourceProxy implements 
 }
 }
 
-/**
- * {@inheritDoc}
- */
 public void purgeOnReturn() {
 try {
 createPool().purgeOnReturn();
@@ -1317,5 +1311,4 @@ public class DataSourceProxy implements 
 log.error("Unable to purge pool.",x);
 }
 }
-
 }

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java?rev=1397873&r1=1397872&r2=1397873&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java
 Sat Oct 13 16:04:33 2012
@@ -62,7 +62,7 @@ public abstract class JdbcInterceptor im
 public static final String ISWRAPPERFOR_VAL = "isWrapperFor";
 
 /**
- * {@link java.sql.Connection#isValid(boolean)} method name
+ * {@link java.sql.Connection#isValid(int)} method name
  */
 public static final String ISVALID_VAL = "isValid";
 

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java?rev=1397873&r1=1397872&r2=1397873&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
 Sat Oct 13 16:04:33 2012
@@ -365,7 +365,6 @@ public class PooledConnection {
  * Returns true if the connection pool is configured
  * to do validation for a certain action.
  * @param action
- * @return
  */
 private boolean doValidate(int action) {
 if (action == PooledConnection.VALIDATE_BORROW &&



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



buildbot success in ASF Buildbot on tomcat-trunk

2012-10-13 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3462

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1397862
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





Re: Time for Taglibs to be sent to the archive?

2012-10-13 Thread Henri Yandell
Hard to argue against it. I've no energy for Taglibs coding. I wish
we'd got a JSTL 1.2 released, but c'est la vie.

All the steps listed sound good except removing the website.
Historically on the Attic side we've kept the websites up with a
notice that the project is dead, rather than going dark on people.

Hen

On Mon, Oct 1, 2012 at 12:55 AM, Henri Gomez  wrote:
> If there is no activity, it make sense.
>
> +0
>
> 2012/10/1 Mark Thomas :
>> In the two+ years since Taglibs moved to the Tomcat project there have
>> been a few short bursts of activity totalling just over 200 commits but
>> no releases. There has also been no progress towards a migration to
>> svnpubsub for the taglibs part of the web site.
>>
>> Given the lack of progress I would propose that Taglibs is moved to our
>> archive. This would mean:
>>
>> - removing the Taglibs link from tomcat.a.o
>> - removing the Taglibs web pages
>> - moving the tomcat/tagslibs svn tree to tomcat/archive/taglibs
>> - making the Taglibs BZ project read-only
>> - moving the Taglibs committers to emeritus status
>> - removing the Taglibs from Gump
>>
>> There is nothing to remove from dist.a.o since there have been no releases
>>
>> Note: This is intended as a discussion topic - not a formal proposal/vote.
>>
>> Thoughts?
>>
>> Mark
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

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



svn commit: r1397944 - in /tomcat/trunk/java: javax/servlet/http/HttpServletResponse.java javax/servlet/http/HttpServletResponseWrapper.java javax/servlet/http/HttpSession.java org/apache/catalina/con

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 20:45:40 2012
New Revision: 1397944

URL: http://svn.apache.org/viewvc?rev=1397944&view=rev
Log:
Fill in some Servlet 3.0 Javadoc

Modified:
tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java
tomcat/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java
tomcat/trunk/java/javax/servlet/http/HttpSession.java
tomcat/trunk/java/org/apache/catalina/connector/Response.java

Modified: tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java?rev=1397944&r1=1397943&r2=1397944&view=diff
==
--- tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java (original)
+++ tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java Sat Oct 13 
20:45:40 2012
@@ -29,8 +29,6 @@ import javax.servlet.ServletResponse;
  * The servlet container creates an HttpServletResponse object and
  * passes it as an argument to the servlet's service methods 
(doGet, doPost, etc).
  *
- * @author Various
- * @version $Version$
  * @see javax.servlet.ServletResponse
  */
 public interface HttpServletResponse extends ServletResponse {
@@ -301,28 +299,38 @@ public interface HttpServletResponse ext
 public void setStatus(int sc, String sm);
 
 /**
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return the HTTP status code associated with this Response.
+ *
+ * @since Servlet 3.0
  */
 public int getStatus();
 
 /**
- * @param name
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return the value for the specified header, or null if this
+ * header has not been set.  If more than one value was added for this
+ * name, only the first is returned; use {@link #getHeaders(String)} to
+ * retrieve all of them.
+ *
+ * @param name Header name to look up
+ *
+ * @since Servlet 3.0
  */
 public String getHeader(String name);
 
 /**
- * @param name
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return a Collection of all the header values associated with the
+ * specified header name.
+ *
+ * @param name Header name to look up
+ *
+ * @since Servlet 3.0
  */
 public Collection getHeaders(String name);
 
 /**
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return an Iterable of all the header names set for this response.
+ *
+ * @since Servlet 3.0
  */
 public Collection getHeaderNames();
 

Modified: tomcat/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java?rev=1397944&r1=1397943&r2=1397944&view=diff
==
--- tomcat/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java 
(original)
+++ tomcat/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java Sat 
Oct 13 20:45:40 2012
@@ -215,7 +215,13 @@ public class HttpServletResponseWrapper 
 }
 
 /**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * 
+ * The default implementation is to call
+ * {@link HttpServletResponse#getStatus()}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
  */
 @Override
 public int getStatus() {
@@ -223,7 +229,13 @@ public class HttpServletResponseWrapper 
 }
 
 /**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * 
+ * The default implementation is to call
+ * {@link HttpServletResponse#getHeader(String)}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
  */
 @Override
 public String getHeader(String name) {
@@ -231,7 +243,13 @@ public class HttpServletResponseWrapper 
 }
 
 /**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * 
+ * The default implementation is to call
+ * {@link HttpServletResponse#getHeaders(String)}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
  */
 @Override
 public Collection getHeaders(String name) {
@@ -239,7 +257,13 @@ public class HttpServletResponseWrapper 
 }
 
 /**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * 
+ * The default implementation is to call
+ * {@link HttpServletResponse#getHeaderNames()}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
  */
 @Override
 public Collection getHeaderNames() {

Modified: tomcat/trunk/java/javax/servlet/http/HttpSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/H

svn commit: r1397945 - in /tomcat/tc7.0.x/trunk: ./ java/javax/servlet/http/HttpServletResponse.java java/javax/servlet/http/HttpServletResponseWrapper.java java/javax/servlet/http/HttpSession.java ja

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 20:46:26 2012
New Revision: 1397945

URL: http://svn.apache.org/viewvc?rev=1397945&view=rev
Log:
Fill in some Servlet 3.0 Javadoc

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java
tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java
tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpSession.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Response.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1397944

Modified: tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java?rev=1397945&r1=1397944&r2=1397945&view=diff
==
--- tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java Sat 
Oct 13 20:46:26 2012
@@ -29,8 +29,6 @@ import javax.servlet.ServletResponse;
  * The servlet container creates an HttpServletResponse object and
  * passes it as an argument to the servlet's service methods 
(doGet, doPost, etc).
  * 
- * @author Various
- * @version $Version$
  * @see javax.servlet.ServletResponse
  */
 public interface HttpServletResponse extends ServletResponse {
@@ -301,28 +299,38 @@ public interface HttpServletResponse ext
 public void setStatus(int sc, String sm);
 
 /**
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return the HTTP status code associated with this Response.
+ *
+ * @since Servlet 3.0
  */
 public int getStatus();
 
 /**
- * @param name
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return the value for the specified header, or null if this
+ * header has not been set.  If more than one value was added for this
+ * name, only the first is returned; use {@link #getHeaders(String)} to
+ * retrieve all of them.
+ *
+ * @param name Header name to look up
+ *
+ * @since Servlet 3.0
  */
 public String getHeader(String name);
 
 /**
- * @param name
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return a Collection of all the header values associated with the
+ * specified header name.
+ *
+ * @param name Header name to look up
+ *
+ * @since Servlet 3.0
  */
 public Collection getHeaders(String name);
 
 /**
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return an Iterable of all the header names set for this response.
+ *
+ * @since Servlet 3.0
  */
 public Collection getHeaderNames();
 

Modified: 
tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java?rev=1397945&r1=1397944&r2=1397945&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java 
Sat Oct 13 20:46:26 2012
@@ -215,7 +215,13 @@ public class HttpServletResponseWrapper 
 }
 
 /**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * 
+ * The default implementation is to call
+ * {@link HttpServletResponse#getStatus()}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
  */
 @Override
 public int getStatus() {
@@ -223,7 +229,13 @@ public class HttpServletResponseWrapper 
 }
 
 /**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * 
+ * The default implementation is to call
+ * {@link HttpServletResponse#getHeader(String)}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
  */
 @Override
 public String getHeader(String name) {
@@ -231,7 +243,13 @@ public class HttpServletResponseWrapper 
 }
 
 /**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * 
+ * The default implementation is to call
+ * {@link HttpServletResponse#getHeaders(String)}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
  */
 @Override
 public Collection getHeaders(String name) {
@@ -239,7 +257,13 @@ public class HttpServletResponseWrapper 
 }
 
 /**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * 
+ * The default implementation is to call
+ * {@link HttpServletResponse#getHeaderNames()}

buildbot failure in ASF Buildbot on tomcat-trunk

2012-10-13 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3464

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1397944
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





svn commit: r1397953 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 21:43:36 2012
New Revision: 1397953

URL: http://svn.apache.org/viewvc?rev=1397953&view=rev
Log:
Run the UCDetector and remove unused code
Some follow-up remains.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Field.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Method.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java?rev=1397953&r1=1397952&r2=1397953&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java 
Sat Oct 13 21:43:36 2012
@@ -18,7 +18,6 @@
 package org.apache.tomcat.util.bcel.classfile;
 
 import java.io.DataInputStream;
-import java.io.DataOutputStream;
 import java.io.IOException;
 
 /**
@@ -76,14 +75,4 @@ public abstract class Annotations extend
 public AnnotationEntry[] getAnnotationEntries() {
 return annotation_table;
 }
-
-protected void writeAnnotations(DataOutputStream dos) throws IOException {
-if (annotation_table == null) {
-return;
-}
-dos.writeShort(annotation_table.length);
-for (int i = 0; i < annotation_table.length; i++) {
-annotation_table[i].dump(dos);
-}
-}
 }

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java?rev=1397953&r1=1397952&r2=1397953&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java 
Sat Oct 13 21:43:36 2012
@@ -117,8 +117,7 @@ public final class ClassParser {
 
 // Return the information we have gathered in a new object
 return new JavaClass(class_name_index, superclass_name_index,
-access_flags, constant_pool, interfaces, fields, methods,
-attributes);
+access_flags, constant_pool, interfaces, attributes);
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java?rev=1397953&r1=1397952&r2=1397953&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java 
Sat Oct 13 21:43:36 2012
@@ -18,7 +18,6 @@
 package org.apache.tomcat.util.bcel.classfile;
 
 import java.io.DataInput;
-import java.io.DataOutputStream;
 import java.io.IOException;
 import java.io.Serializable;
 
@@ -36,15 +35,6 @@ import org.apache.tomcat.util.bcel.Const
 public final class CodeException implements Cloneable, Constants, Serializable 
{
 
 private static final long serialVersionUID = -6351674720658890686L;
-private int start_pc; // Range in the code the exception handler is
-private int end_pc; // active. start_pc is inclusive, end_pc exclusive
-private int handler_pc; /* Starting address of exception handler, i.e.,
- * an offset from start of code.
- */
-private int catch_type; /* If this is zero the

svn commit: r1397957 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 21:54:57 2012
New Revision: 1397957

URL: http://svn.apache.org/viewvc?rev=1397957&view=rev
Log:
Remove unused code identified by Eclipse

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java 
Sat Oct 13 21:54:57 2012
@@ -43,12 +43,10 @@ public final class CodeException impleme
  * @throws IOException
  */
 CodeException(DataInput file) throws IOException {
-this(file.readUnsignedShort(), file.readUnsignedShort(), 
file.readUnsignedShort(), file
-.readUnsignedShort());
-}
-
-
-public CodeException(int start_pc, int end_pc, int handler_pc, int 
catch_type) {
+file.readUnsignedShort();
+file.readUnsignedShort();
+file.readUnsignedShort();
+file.readUnsignedShort();
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java Sat 
Oct 13 21:54:57 2012
@@ -40,13 +40,10 @@ public final class InnerClass implements
  * @throws IOException
  */
 InnerClass(DataInput file) throws IOException {
-this(file.readUnsignedShort(), file.readUnsignedShort(), 
file.readUnsignedShort(), file
-.readUnsignedShort());
-}
-
-
-public InnerClass(int inner_class_index, int outer_class_index, int 
inner_name_index,
-int inner_access_flags) {
+file.readUnsignedShort();
+file.readUnsignedShort();
+file.readUnsignedShort();
+file.readUnsignedShort();
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java 
Sat Oct 13 21:54:57 2012
@@ -44,15 +44,12 @@ public final class LocalVariable impleme
  * @param file Input stream
  * @throws IOException
  */
-LocalVariable(DataInput file, ConstantPool constant_pool) throws 
IOException {
-this(file.readUnsignedShort(), file.readUnsignedShort(), 
file.readUnsignedShort(), file
-.readUnsignedShort(), file.readUnsignedShort(), constant_pool);
-}
-
-
-public LocalVariable(int start_pc, int length, int name_index, int 
signature_index, int index,
-ConstantPool constant_pool) {
-this.index = index;
+LocalVariable(DataInput file) throws IOException {
+file.readUnsignedShort();
+file.readUnsignedShort();
+file.readUnsignedShort();
+file.readUnsignedShort();
+this.index = file.readUnsignedShort();
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java 
Sat Oct 13 21:54

svn commit: r1397962 - in /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile: CodeException.java ConstantInvokeDynamic.java ConstantMethodHandle.java ConstantMethodType.java

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 22:16:58 2012
New Revision: 1397962

URL: http://svn.apache.org/viewvc?rev=1397962&view=rev
Log:
Start to add comments identifying what is being read but not used (to aid 
debugging / future extension)

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java?rev=1397962&r1=1397961&r2=1397962&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java 
Sat Oct 13 22:16:58 2012
@@ -43,10 +43,10 @@ public final class CodeException impleme
  * @throws IOException
  */
 CodeException(DataInput file) throws IOException {
-file.readUnsignedShort();
-file.readUnsignedShort();
-file.readUnsignedShort();
-file.readUnsignedShort();
+file.readUnsignedShort();   // Unused start_pc
+file.readUnsignedShort();   // Unused end_pc
+file.readUnsignedShort();   // Unused handler_pc
+file.readUnsignedShort();   // Unused catch_type
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java?rev=1397962&r1=1397961&r2=1397962&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java
 Sat Oct 13 22:16:58 2012
@@ -42,8 +42,8 @@ public final class ConstantInvokeDynamic
  */
 ConstantInvokeDynamic(DataInput file) throws IOException {
 this();
-file.readUnsignedShort();
-file.readUnsignedShort();
+file.readUnsignedShort();   // Unused bootstrap_method_attr_index
+file.readUnsignedShort();   // Unused name_and_type_index
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java?rev=1397962&r1=1397961&r2=1397962&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java
 Sat Oct 13 22:16:58 2012
@@ -42,8 +42,8 @@ public final class ConstantMethodHandle 
  */
 ConstantMethodHandle(DataInput file) throws IOException {
 this();
-file.readUnsignedByte();
-file.readUnsignedShort();
+file.readUnsignedByte();// Unused reference_kind
+file.readUnsignedShort();   // Unused reference_index
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java?rev=1397962&r1=1397961&r2=1397962&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java 
Sat Oct 13 22:16:58 2012
@@ -42,7 +42,7 @@ public final class ConstantMethodType ex
  */
 ConstantMethodType(DataInput file) throws IOException {
 this();
-file.readUnsignedShort();
+file.readUnsignedShort();   // Unused descriptor_index
 }
 
 



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



svn commit: r1397964 - in /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile: InnerClass.java LineNumber.java LocalVariable.java PMGClass.java Signature.java SourceFile.java StackMapEntry.java S

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 22:23:42 2012
New Revision: 1397964

URL: http://svn.apache.org/viewvc?rev=1397964&view=rev
Log:
Complete adding comments identifying what is being read but not used (to aid 
debugging / future extension)

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java?rev=1397964&r1=1397963&r2=1397964&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java Sat 
Oct 13 22:23:42 2012
@@ -40,10 +40,10 @@ public final class InnerClass implements
  * @throws IOException
  */
 InnerClass(DataInput file) throws IOException {
-file.readUnsignedShort();
-file.readUnsignedShort();
-file.readUnsignedShort();
-file.readUnsignedShort();
+file.readUnsignedShort();   // Unused inner_class_index
+file.readUnsignedShort();   // Unused outer_class_index
+file.readUnsignedShort();   // Unused inner_name_index
+file.readUnsignedShort();   // Unused inner_access_flags
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java?rev=1397964&r1=1397963&r2=1397964&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java Sat 
Oct 13 22:23:42 2012
@@ -41,8 +41,8 @@ public final class LineNumber implements
  * @throws IOException
  */
 LineNumber(DataInput file) throws IOException {
-file.readUnsignedShort();
-file.readUnsignedShort();
+file.readUnsignedShort();   // Unused start_pc
+file.readUnsignedShort();   // Unused line_number
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java?rev=1397964&r1=1397963&r2=1397964&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java 
Sat Oct 13 22:23:42 2012
@@ -42,11 +42,11 @@ public final class LocalVariable impleme
  * @throws IOException
  */
 LocalVariable(DataInput file) throws IOException {
-file.readUnsignedShort();
-file.readUnsignedShort();
-file.readUnsignedShort();
-file.readUnsignedShort();
-file.readUnsignedShort();
+file.readUnsignedShort();   // Unused start_pc
+file.readUnsignedShort();   // Unused length
+file.readUnsignedShort();   // Unused name_index
+file.readUnsignedShort();   // Unused signature_index
+file.readUnsignedShort();   // Unused index
 }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java?rev=1397964&r1=1397963&r2=1397964&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java Sat 
Oct 13 22:23:42 2012
@@ -44,8 +44,8 @@ public final class PMGClass extends Attr
 PMGClass(int name_index, int length, DataInput file, ConstantPool 
constant_pool)
 throws IOException {
 this(name_index, length, constant_pool);
-file.readUnsignedShort();
-file.readUnsignedShort();
+file.readUnsignedShort();   // Unused pmg_index
+file.readUnsignedShort();   // Unused pmg_class_index
 }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomca

Re: svn commit: r1397953 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/

2012-10-13 Thread Mark Thomas
On 13/10/2012 22:43, ma...@apache.org wrote:
> Author: markt
> Date: Sat Oct 13 21:43:36 2012
> New Revision: 1397953
> 
> URL: http://svn.apache.org/viewvc?rev=1397953&view=rev
> Log:
> Run the UCDetector and remove unused code
> Some follow-up remains.

Drat. This clean-up was too aggressive. I need to revert all my changes
from this one forward. Sorry for the noise.

Mark


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



Re: svn commit: r1397953 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/

2012-10-13 Thread Konstantin Kolinko
2012/10/14 Mark Thomas :
> On 13/10/2012 22:43, ma...@apache.org wrote:
>> Author: markt
>> Date: Sat Oct 13 21:43:36 2012
>> New Revision: 1397953
>>
>> URL: http://svn.apache.org/viewvc?rev=1397953&view=rev
>> Log:
>> Run the UCDetector and remove unused code
>> Some follow-up remains.
>
> Drat. This clean-up was too aggressive. I need to revert all my changes
> from this one forward. Sorry for the noise.
>

I think/suspect that you need to revert your toString() removal as well
URL: http://svn.apache.org/viewvc?rev=1397950&view=rev

You have already reverted it once before
http://svn.apache.org/viewvc?view=revision&revision=1384063

>From buildbot logs:
http://ci.apache.org/builders/tomcat-trunk/builds/3465/steps/compile_1/logs/stdio
[[[
[junit] Caused by: java.lang.StackOverflowError
[junit] at java.lang.Object.toString(Object.java:237)
[junit] at
org.apache.tomcat.util.bcel.classfile.Constant$1.hashCode(Constant.java:51)
[junit] at
org.apache.tomcat.util.bcel.classfile.Constant.hashCode(Constant.java:150)
[junit] at java.lang.Object.toString(Object.java:237)
[junit] at
org.apache.tomcat.util.bcel.classfile.Constant$1.hashCode(Constant.java:51)
[junit] at
org.apache.tomcat.util.bcel.classfile.Constant.hashCode(Constant.java:150)
]]]

Best regards,
Konstantin Kolinko

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



Re: svn commit: r1397953 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/

2012-10-13 Thread Mark Thomas
On 14/10/2012 00:05, Konstantin Kolinko wrote:
> 2012/10/14 Mark Thomas :
>> On 13/10/2012 22:43, ma...@apache.org wrote:
>>> Author: markt
>>> Date: Sat Oct 13 21:43:36 2012
>>> New Revision: 1397953
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1397953&view=rev
>>> Log:
>>> Run the UCDetector and remove unused code
>>> Some follow-up remains.
>>
>> Drat. This clean-up was too aggressive. I need to revert all my changes
>> from this one forward. Sorry for the noise.
>>
> 
> I think/suspect that you need to revert your toString() removal as well
> URL: http://svn.apache.org/viewvc?rev=1397950&view=rev

I don't think so.

> You have already reverted it once before
> http://svn.apache.org/viewvc?view=revision&revision=1384063

That was because I incorrectly removed the stringifyValue() methods.

> From buildbot logs:
> http://ci.apache.org/builders/tomcat-trunk/builds/3465/steps/compile_1/logs/stdio
> [[[
> [junit] Caused by: java.lang.StackOverflowError

That is an issue with the error handling once the toString() methods
have been removed, not directly an issue with removing the toString methods.

Mark


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



Re: svn commit: r1397953 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/

2012-10-13 Thread Konstantin Kolinko
2012/10/14 Mark Thomas :
> On 14/10/2012 00:05, Konstantin Kolinko wrote:
>> 2012/10/14 Mark Thomas :
>>> On 13/10/2012 22:43, ma...@apache.org wrote:
 Author: markt
 Date: Sat Oct 13 21:43:36 2012
 New Revision: 1397953

 URL: http://svn.apache.org/viewvc?rev=1397953&view=rev
 Log:
 Run the UCDetector and remove unused code
 Some follow-up remains.
>>>
>>> Drat. This clean-up was too aggressive. I need to revert all my changes
>>> from this one forward. Sorry for the noise.
>>>
>>
>> I think/suspect that you need to revert your toString() removal as well
>> URL: http://svn.apache.org/viewvc?rev=1397950&view=rev
>
> I don't think so.
>
>> You have already reverted it once before
>> http://svn.apache.org/viewvc?view=revision&revision=1384063
>
> That was because I incorrectly removed the stringifyValue() methods.
>
>> From buildbot logs:
>> http://ci.apache.org/builders/tomcat-trunk/builds/3465/steps/compile_1/logs/stdio
>> [[[
>> [junit] Caused by: java.lang.StackOverflowError
>
> That is an issue with the error handling once the toString() methods
> have been removed, not directly an issue with removing the toString methods.
>

http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java?view=markup

38  private static BCELComparator _cmp = new BCELComparator() {
39  
40  @Override
41  public boolean equals( Object o1, Object o2 ) {
42  Constant THIS = (Constant) o1;
43  Constant THAT = (Constant) o2;
44  return THIS.toString().equals(THAT.toString());
45  }
46  
47  
48  @Override
49  public int hashCode( Object o ) {
50  Constant THIS = (Constant) o;
51  return THIS.toString().hashCode();
52  }
53  };

It would not work anymore, because of changes in toString() (the
default implementation contains hashCode value, which changes.

142 /**
143 * Return value as defined by given BCELComparator strategy.
144 * By default return the hashcode of the result of toString().
145 *
146 * @see java.lang.Object#hashCode()
147 */
148 @Override
149 public int hashCode() {
150 return _cmp.hashCode(this);
151 }

Calls _cmp.hashCode(this) which calls THIS.toString() which now calls
Object.toString(), which calls Object.hashCode(), causing a loop.

Best regards,
Konstantin Kolinko

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



svn commit: r1397969 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java

2012-10-13 Thread markt
Author: markt
Date: Sat Oct 13 23:38:00 2012
New Revision: 1397969

URL: http://svn.apache.org/viewvc?rev=1397969&view=rev
Log:
A couple more identifying comments

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java?rev=1397969&r1=1397968&r2=1397969&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java 
Sat Oct 13 23:38:00 2012
@@ -234,7 +234,7 @@ public final class ClassParser {
  * @throws  ClassFormatException
  */
 private final void readVersion() throws IOException, ClassFormatException {
-file.readUnsignedShort();
-file.readUnsignedShort();
+file.readUnsignedShort();   // Unused minor
+file.readUnsignedShort();   // Unused major
 }
 }



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



svn commit: r1397971 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:13:57 2012
New Revision: 1397971

URL: http://svn.apache.org/viewvc?rev=1397971&view=rev
Log:
Restore incorrectly removed reads when parsing

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java?rev=1397971&r1=1397970&r2=1397971&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java Sun Oct 
14 00:13:57 2012
@@ -59,8 +59,10 @@ public final class Code extends Attribut
 Code(int name_index, int length, DataInputStream file, ConstantPool 
constant_pool)
 throws IOException {
 // Initialize with some default values which will be overwritten later
-this(name_index, length, (byte[]) null, (CodeException[]) null,
-(Attribute[]) null, constant_pool);
+this(name_index, length, (byte[]) null,
+(CodeException[]) null, (Attribute[]) null, constant_pool);
+file.readUnsignedShort();   // Unused max_stack
+file.readUnsignedShort();   // Unused max_locals
 code_length = file.readInt();
 code = new byte[code_length]; // Read byte code
 file.readFully(code);



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



svn commit: r1397972 - in /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile: StackMapEntry.java StackMapTableEntry.java

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:16:10 2012
New Revision: 1397972

URL: http://svn.apache.org/viewvc?rev=1397972&view=rev
Log:
Restore incorrectly removed reads when parsing

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java?rev=1397972&r1=1397971&r2=1397972&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java 
Sun Oct 14 00:16:10 2012
@@ -35,9 +35,38 @@ public final class StackMapEntry impleme
 
 private static final long serialVersionUID = 1L;
 
+private int number_of_locals;
+private StackMapType[] types_of_locals;
+private int number_of_stack_items;
+private StackMapType[] types_of_stack_items;
+
+
+/**
+ * Construct object from file stream.
+ * @param file Input stream
+ * @throws IOException
+ */
 StackMapEntry(DataInputStream file) throws IOException {
-file.readShort();   // Unused byte_code_offset
-file.readShort();   // Unused number_of_locals
+this(file.readShort(), file.readShort(), null, -1, null);
+types_of_locals = new StackMapType[number_of_locals];
+for (int i = 0; i < number_of_locals; i++) {
+types_of_locals[i] = new StackMapType(file);
+}
+number_of_stack_items = file.readShort();
+types_of_stack_items = new StackMapType[number_of_stack_items];
+for (int i = 0; i < number_of_stack_items; i++) {
+types_of_stack_items[i] = new StackMapType(file);
+}
+}
+
+
+public StackMapEntry(int byte_code_offset, int number_of_locals,
+StackMapType[] types_of_locals, int number_of_stack_items,
+StackMapType[] types_of_stack_items) {
+this.number_of_locals = number_of_locals;
+this.types_of_locals = types_of_locals;
+this.number_of_stack_items = number_of_stack_items;
+this.types_of_stack_items = types_of_stack_items;
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java?rev=1397972&r1=1397971&r2=1397972&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java 
Sun Oct 14 00:16:10 2012
@@ -21,6 +21,8 @@ import java.io.DataInputStream;
 import java.io.IOException;
 import java.io.Serializable;
 
+import org.apache.tomcat.util.bcel.Constants;
+
 /**
  * This class represents a stack map entry recording the types of
  * local variables and the the of stack items at a given byte code offset.
@@ -35,6 +37,12 @@ public final class StackMapTableEntry im
 
 private static final long serialVersionUID = 1L;
 
+private int frame_type;
+private int number_of_locals;
+private StackMapType[] types_of_locals;
+private int number_of_stack_items;
+private StackMapType[] types_of_stack_items;
+
 
 /**
  * Construct object from file stream.
@@ -42,7 +50,57 @@ public final class StackMapTableEntry im
  * @throws IOException
  */
 StackMapTableEntry(DataInputStream file) throws IOException {
-file.read();// Unused frame_type
+this(file.read(), -1, null, -1, null);
+
+if (frame_type >= Constants.SAME_FRAME && frame_type <= 
Constants.SAME_FRAME_MAX) {
+// NO-OP
+} else if (frame_type >= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME && 
frame_type <= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
+number_of_stack_items = 1;
+types_of_stack_items = new StackMapType[1];
+types_of_stack_items[0] = new StackMapType(file);
+} else if (frame_type == 
Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
+file.readShort(); // Unused byte_code_offset_delta
+number_of_stack_items = 1;
+types_of_stack_items = new StackMapType[1];
+types_of_stack_items[0] = new StackMapType(file);
+} else if (frame_type >= Constants.CHOP_FRAME && frame_type <= 
Constants.CHOP_FRAME_MAX) {
+file.readShort(); // Unused byte_code_offset_delta
+} else if (frame_type == Constants.SAME_FRAME_EXTENDED) {
+file.readShort(); // Unused byte_code_offset_delta
+} else if (frame_type >= Constants.APPEND_FRAME && frame_type <= 
Constants.APPEND_FRA

svn commit: r1397973 - in /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile: ConstantInvokeDynamic.java ConstantMethodHandle.java ConstantMethodType.java ConstantValue.java PMGClass.java Signat

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:18:29 2012
New Revision: 1397973

URL: http://svn.apache.org/viewvc?rev=1397973&view=rev
Log:
Use a single constructor

Modified:

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java?rev=1397973&r1=1397972&r2=1397973&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java
 Sun Oct 14 00:18:29 2012
@@ -41,13 +41,8 @@ public final class ConstantInvokeDynamic
  * @throws IOException
  */
 ConstantInvokeDynamic(DataInput file) throws IOException {
-this();
+super(Constants.CONSTANT_InvokeDynamic);
 file.readUnsignedShort();   // Unused bootstrap_method_attr_index
 file.readUnsignedShort();   // Unused name_and_type_index
 }
-
-
-public ConstantInvokeDynamic() {
-super(Constants.CONSTANT_InvokeDynamic);
-}
 }

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java?rev=1397973&r1=1397972&r2=1397973&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java
 Sun Oct 14 00:18:29 2012
@@ -41,13 +41,8 @@ public final class ConstantMethodHandle 
  * @throws IOException
  */
 ConstantMethodHandle(DataInput file) throws IOException {
-this();
+super(Constants.CONSTANT_MethodHandle);
 file.readUnsignedByte();// Unused reference_kind
 file.readUnsignedShort();   // Unused reference_index
 }
-
-
-public ConstantMethodHandle() {
-super(Constants.CONSTANT_MethodHandle);
-}
 }

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java?rev=1397973&r1=1397972&r2=1397973&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java 
Sun Oct 14 00:18:29 2012
@@ -41,12 +41,7 @@ public final class ConstantMethodType ex
  * @throws IOException
  */
 ConstantMethodType(DataInput file) throws IOException {
-this();
-file.readUnsignedShort();   // Unused descriptor_index
-}
-
-
-public ConstantMethodType() {
 super(Constants.CONSTANT_MethodType);
+file.readUnsignedShort();   // Unused descriptor_index
 }
 }

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java?rev=1397973&r1=1397972&r2=1397973&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java 
Sun Oct 14 00:18:29 2012
@@ -43,18 +43,8 @@ public final class ConstantValue extends
  */
 ConstantValue(int name_index, int length, DataInput file, ConstantPool 
constant_pool)
 throws IOException {
-this(name_index, length, constant_pool);
-}
-
-
-/**
- * @param name_index Name index in constant pool
- * @param length Content length in bytes
- * @param constant_pool Array of constants
- */
-public ConstantValue(int name_index, int length,
-ConstantPool constant_pool) {
 super(name_index, length, constant_pool);
+file.readUnsignedShort();   // Unused constantvalue_index
 }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/j

Re: svn commit: r1397953 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/

2012-10-13 Thread Mark Thomas
On 13/10/2012 23:57, Mark Thomas wrote:
> On 13/10/2012 22:43, ma...@apache.org wrote:
>> Author: markt
>> Date: Sat Oct 13 21:43:36 2012
>> New Revision: 1397953
>>
>> URL: http://svn.apache.org/viewvc?rev=1397953&view=rev
>> Log:
>> Run the UCDetector and remove unused code
>> Some follow-up remains.
> 
> Drat. This clean-up was too aggressive. I need to revert all my changes
> from this one forward. Sorry for the noise.

In the end, I reverted locally and re-did the changes taking care to
keep all the file reads. I then committed the changes.

Mark


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



svn commit: r1397974 - in /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile: RuntimeInvisibleAnnotations.java RuntimeInvisibleParameterAnnotations.java RuntimeVisibleAnnotations.java

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:19:56 2012
New Revision: 1397974

URL: http://svn.apache.org/viewvc?rev=1397974&view=rev
Log:
Line length

Modified:

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java?rev=1397974&r1=1397973&r2=1397974&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java
 Sun Oct 14 00:19:56 2012
@@ -46,8 +46,7 @@ public class RuntimeInvisibleAnnotations
 DataInputStream file, ConstantPool 
constant_pool)
 throws IOException
 {
-super(name_index, length,
-file, constant_pool);
+super(name_index, length, file, constant_pool);
 }
 
 /**

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java?rev=1397974&r1=1397973&r2=1397974&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
 Sun Oct 14 00:19:56 2012
@@ -41,8 +41,7 @@ public class RuntimeInvisibleParameterAn
  */
 RuntimeInvisibleParameterAnnotations(int name_index, int length, 
DataInputStream file,
 ConstantPool constant_pool) throws IOException {
-super(name_index, length, file,
-constant_pool);
+super(name_index, length, file, constant_pool);
 }
 
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java?rev=1397974&r1=1397973&r2=1397974&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
 Sun Oct 14 00:19:56 2012
@@ -46,8 +46,7 @@ public class RuntimeVisibleAnnotations e
 DataInputStream file, ConstantPool constant_pool)
 throws IOException
 {
-super(name_index, length,
-file, constant_pool);
+super(name_index, length, file, constant_pool);
 }
 
 /**



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



svn commit: r1397976 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:22:37 2012
New Revision: 1397976

URL: http://svn.apache.org/viewvc?rev=1397976&view=rev
Log:
Update constants

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java?rev=1397976&r1=1397975&r2=1397976&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java Sun Oct 14 
00:22:37 2012
@@ -45,22 +45,6 @@ public interface Constants {
*/
   public static final short ACC_ENUM = 0x4000;
 
-  // Applies to classes compiled by new compilers only
-  /** One of the access flags for fields, methods, or classes.
-   */
-  public static final short ACC_SUPER= 0x0020;
-
-  /** One of the access flags for fields, methods, or classes.
-   */
-  public static final short MAX_ACC_FLAG = ACC_ENUM;
-
-  /** The names of the access flags. */
-  public static final String[] ACCESS_NAMES = {
-"public", "private", "protected", "static", "final", "synchronized",
-"volatile", "transient", "native", "interface", "abstract", "strictfp",
-"synthetic", "annotation", "enum"
-  };
-
   /** Marks a constant pool entry as type UTF-8.  */
   public static final byte CONSTANT_Utf8   = 1;
 
@@ -112,170 +96,6 @@ public interface Constants {
 "CONSTANT_NameAndType", "CONSTANT_MethodHandle",
 "CONSTANT_MethodType", "CONSTANT_InvokeDynamic" };
 
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short LDC  = 18;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short LDC_W= 19;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short LDC2_W   = 20;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short ILOAD= 21;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short LLOAD= 22;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short FLOAD= 23;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short DLOAD= 24;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short ALOAD= 25;
-
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short ISTORE   = 54;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short LSTORE   = 55;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short FSTORE   = 56;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short DSTORE   = 57;
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short ASTORE   = 58;
-
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html";>Opcode
 definitions in The Java Virtual Machine Specification */
-  public static final short IINC = 132;
-
-  /** Java VM opcode.
-   * @see http://java.sun.com/docs/books/jvms

svn commit: r1397977 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:23:04 2012
New Revision: 1397977

URL: http://svn.apache.org/viewvc?rev=1397977&view=rev
Log:
Remove more unused code

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java?rev=1397977&r1=1397976&r2=1397977&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java 
Sun Oct 14 00:23:04 2012
@@ -18,7 +18,6 @@
 package org.apache.tomcat.util.bcel.classfile;
 
 import java.io.DataInput;
-import java.io.DataOutputStream;
 import java.io.IOException;
 import java.io.Serializable;
 
@@ -39,7 +38,6 @@ public final class StackMapType implemen
 private static final long serialVersionUID = 1L;
 
 private byte type;
-private int index = -1; // Index to CONSTANT_Class or offset
 
 
 /**
@@ -48,23 +46,13 @@ public final class StackMapType implemen
  * @throws IOException
  */
 StackMapType(DataInput file) throws IOException {
-this(file.readByte(), -1);
+setType(file.readByte());
 if (hasIndex()) {
-setIndex(file.readShort());
+file.readShort();   // Unused index
 }
 }
 
 
-/**
- * @param type type tag as defined in the Constants interface
- * @param index index to constant pool, or byte code offset
- */
-public StackMapType(byte type, int index) {
-setType(type);
-setIndex(index);
-}
-
-
 public void setType( byte t ) {
 if ((t < Constants.ITEM_Bogus) || (t > Constants.ITEM_NewObject)) {
 throw new RuntimeException("Illegal type for StackMapType: " + t);
@@ -73,33 +61,6 @@ public final class StackMapType implemen
 }
 
 
-public void setIndex( int t ) {
-index = t;
-}
-
-
-/** @return index to constant pool if type == ITEM_Object, or offset
- * in byte code, if type == ITEM_NewObject, and -1 otherwise
- */
-public int getIndex() {
-return index;
-}
-
-
-/**
- * Dump type entries to file.
- *
- * @param file Output file stream
- * @throws IOException
- */
-public final void dump( DataOutputStream file ) throws IOException {
-file.writeByte(type);
-if (hasIndex()) {
-file.writeShort(getIndex());
-}
-}
-
-
 /** @return true, if type is either ITEM_Object or ITEM_NewObject
  */
 public final boolean hasIndex() {



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



svn commit: r1397978 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:26:02 2012
New Revision: 1397978

URL: http://svn.apache.org/viewvc?rev=1397978&view=rev
Log:
UCDetector

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java?rev=1397978&r1=1397977&r2=1397978&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/Constants.java Sun Oct 14 
00:26:02 2012
@@ -41,10 +41,6 @@ public interface Constants {
*/
   public static final short ACC_ANNOTATION   = 0x2000;
 
-  /** One of the access flags for fields, methods, or classes.
-   */
-  public static final short ACC_ENUM = 0x4000;
-
   /** Marks a constant pool entry as type UTF-8.  */
   public static final byte CONSTANT_Utf8   = 1;
 
@@ -96,24 +92,6 @@ public interface Constants {
 "CONSTANT_NameAndType", "CONSTANT_MethodHandle",
 "CONSTANT_MethodType", "CONSTANT_InvokeDynamic" };
 
-  /** Illegal opcode. */
-  public static final short  UNDEFINED  = -1;
-  /** Illegal opcode. */
-  public static final short  UNPREDICTABLE  = -2;
-  /** Illegal opcode. */
-  public static final short  RESERVED   = -3;
-  /** Mnemonic for an illegal opcode. */
-  public static final String ILLEGAL_OPCODE = "";
-  /** Mnemonic for an illegal type. */
-  public static final String ILLEGAL_TYPE   = "";
-
-  /** Byte data type. */
-  public static final byte T_BYTE= 8;
-  /** Short data type. */
-  public static final byte T_SHORT   = 9;
-  /** Int data type. */
-  public static final byte T_INT = 10;
-
 
   /** Attributes and their corresponding names.
*/



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



buildbot failure in ASF Buildbot on tomcat-trunk

2012-10-13 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3469

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1397969
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





svn commit: r1397979 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:42:00 2012
New Revision: 1397979

URL: http://svn.apache.org/viewvc?rev=1397979&view=rev
Log:
Prevent a stack overflow when generating an error message if parsing fails and 
provide some useful information in error message.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java?rev=1397979&r1=1397978&r2=1397979&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java Sun 
Oct 14 00:42:00 2012
@@ -126,6 +126,13 @@ public abstract class Constant implement
 }
 
 
+
+@Override
+public String toString() {
+return "[" + tag + "]";
+}
+
+
 /**
  * Return value as defined by given BCELComparator strategy.
  * By default two Constant objects are said to be equal when



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



svn commit: r1397980 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:46:14 2012
New Revision: 1397980

URL: http://svn.apache.org/viewvc?rev=1397980&view=rev
Log:
Fix unused parameter warning

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java?rev=1397980&r1=1397979&r2=1397980&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java 
Sun Oct 14 00:46:14 2012
@@ -47,7 +47,10 @@ public final class StackMapEntry impleme
  * @throws IOException
  */
 StackMapEntry(DataInputStream file) throws IOException {
-this(file.readShort(), file.readShort(), null, -1, null);
+file.readShort();   // Unused byte_code_offset
+number_of_locals = file.readShort();
+types_of_locals = null;
+types_of_stack_items = null;
 types_of_locals = new StackMapType[number_of_locals];
 for (int i = 0; i < number_of_locals; i++) {
 types_of_locals[i] = new StackMapType(file);
@@ -60,16 +63,6 @@ public final class StackMapEntry impleme
 }
 
 
-public StackMapEntry(int byte_code_offset, int number_of_locals,
-StackMapType[] types_of_locals, int number_of_stack_items,
-StackMapType[] types_of_stack_items) {
-this.number_of_locals = number_of_locals;
-this.types_of_locals = types_of_locals;
-this.number_of_stack_items = number_of_stack_items;
-this.types_of_stack_items = types_of_stack_items;
-}
-
-
 /**
  * @return deep copy of this object
  */



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



svn commit: r1397982 - /tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:48:11 2012
New Revision: 1397982

URL: http://svn.apache.org/viewvc?rev=1397982&view=rev
Log:
Comment out debug code

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java?rev=1397982&r1=1397981&r2=1397982&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java Sun Oct 14 
00:48:11 2012
@@ -193,7 +193,7 @@ public class TestSsl extends TomcatBaseT
 BufferedReader br = new BufferedReader(r);
 String line = br.readLine();
 while (line != null) {
-System.out.println(line);
+// For debugging System.out.println(line);
 // Linux clients see a Connection Reset in some circumstances and a
 // clean close in others.
 try {



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



svn commit: r1397985 - in /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile: ClassParser.java Field.java FieldOrMethod.java Method.java

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 00:53:23 2012
New Revision: 1397985

URL: http://svn.apache.org/viewvc?rev=1397985&view=rev
Log:
Only need FieldOrMethod, not individual classes

Removed:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Field.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Method.java
Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java?rev=1397985&r1=1397984&r2=1397985&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java 
Sun Oct 14 00:53:23 2012
@@ -47,8 +47,8 @@ public final class ClassParser {
 private int access_flags; // Access rights of parsed class
 private int[] interfaces; // Names of implemented interfaces
 private ConstantPool constant_pool; // collection of constants
-private Field[] fields; // class fields, i.e., its variables
-private Method[] methods; // methods defined in the class
+private FieldOrMethod[] fields; // class fields, i.e., its variables
+private FieldOrMethod[] methods; // methods defined in the class
 private Attribute[] attributes; // attributes defined in the class
 private static final int BUFSIZE = 8192;
 
@@ -176,9 +176,9 @@ public final class ClassParser {
 private final void readFields() throws IOException, ClassFormatException {
 int fields_count;
 fields_count = file.readUnsignedShort();
-fields = new Field[fields_count];
+fields = new FieldOrMethod[fields_count];
 for (int i = 0; i < fields_count; i++) {
-fields[i] = new Field(file, constant_pool);
+fields[i] = new FieldOrMethod(file, constant_pool);
 }
 }
 
@@ -221,9 +221,9 @@ public final class ClassParser {
 private final void readMethods() throws IOException, ClassFormatException {
 int methods_count;
 methods_count = file.readUnsignedShort();
-methods = new Method[methods_count];
+methods = new FieldOrMethod[methods_count];
 for (int i = 0; i < methods_count; i++) {
-methods[i] = new Method(file, constant_pool);
+methods[i] = new FieldOrMethod(file, constant_pool);
 }
 }
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java?rev=1397985&r1=1397984&r2=1397985&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java 
Sun Oct 14 00:53:23 2012
@@ -21,16 +21,35 @@ import java.io.DataInputStream;
 import java.io.IOException;
 
 import org.apache.tomcat.util.bcel.Constants;
+import org.apache.tomcat.util.bcel.util.BCELComparator;
 
 /**
- * Abstract super class for fields and methods.
+ * Class for fields and methods.
  *
  * @version $Id$
  * @author  mailto:m.d...@gmx.de";>M. Dahm
  */
-public abstract class FieldOrMethod extends AccessFlags implements Cloneable {
+public class FieldOrMethod extends AccessFlags implements Cloneable {
 
 private static final long serialVersionUID = -3383525930205542157L;
+private static BCELComparator _cmp = new BCELComparator() {
+
+@Override
+public boolean equals( Object o1, Object o2 ) {
+FieldOrMethod THIS = (FieldOrMethod) o1;
+FieldOrMethod THAT = (FieldOrMethod) o2;
+return THIS.getName().equals(THAT.getName())
+&& THIS.getSignature().equals(THAT.getSignature());
+}
+
+
+@Override
+public int hashCode( Object o ) {
+FieldOrMethod THIS = (FieldOrMethod) o;
+return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
+}
+};
+
 protected int name_index; // Points to field name in constant pool
 protected int signature_index; // Points to encoded signature
 protected int attributes_count; // No. of attributes
@@ -104,4 +123,28 @@ public abstract class FieldOrMethod exte
 c = (ConstantUtf8) constant_pool.getConstant(signature_index, 
Constants.CONSTANT_Utf8);
 return c.getBytes();
 }
+
+/**
+ * Return value as defined by given BCELComparator strategy.
+ * By default two FieldOrMethod objects are said to be equal when
+ * their names and signatures are equal.
+ *
+ * @see java.lang.Object#equals(java.lang.Obje

buildbot success in ASF Buildbot on tomcat-trunk

2012-10-13 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3470

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1397978
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





svn commit: r1397988 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/

2012-10-13 Thread markt
Author: markt
Date: Sun Oct 14 01:00:48 2012
New Revision: 1397988

URL: http://svn.apache.org/viewvc?rev=1397988&view=rev
Log:
Remove unused copy() method

Modified:

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMap.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Unknown.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java?rev=1397988&r1=1397987&r2=1397988&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java 
Sun Oct 14 01:00:48 2012
@@ -66,11 +66,4 @@ public class AnnotationDefault extends A
 {
 super(name_index, length, constant_pool);
 }
-
-
-@Override
-public Attribute copy(ConstantPool _constant_pool)
-{
-throw new RuntimeException("Not implemented yet!");
-}
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java?rev=1397988&r1=1397987&r2=1397988&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java Sun 
Oct 14 01:00:48 2012
@@ -197,9 +197,4 @@ public abstract class Attribute implemen
 }
 return o;
 }
-
-/**
- * @return deep copy of this attribute
- */
-public abstract Attribute copy(ConstantPool _constant_pool);
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java?rev=1397988&r1=1397987&r2=1397988&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Code.java Sun Oct 
14 01:00:48 2012
@@ -161,29 +161,4 @@ public final class Code extends Attribut
 exception_table_length = (exception_table == null) ? 0 : 
exception_table.length;
 length = calculateLength(); // Adjust length
 }
-
-
-/**
- * @return deep copy of this attribute
- *
- * @param _constant_pool the constant pool to duplicate
- */
-@Override
-public Attribute copy( ConstantPool _constant_pool ) {
-Code c = (Code) clone();
-if (code != null) {
-c.code = new byte[code.length];
-