[Bug 56991] New: Request attribute org.apache.catalina.jsp_file needs to be nulled out after single use

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56991

Bug ID: 56991
   Summary: Request attribute org.apache.catalina.jsp_file needs
to be nulled out after single use
   Product: Tomcat 8
   Version: 8.0.12
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: j...@mortbay.com

See JspServlet lines 302-304:

   // JSP specified via  in  declaration and supplied
through
   //custom servlet container code
   jspUri = (String) request.getAttribute(Constants.JSP_FILE);


The comment here implies that the container uses this method to identify a
servlet that is declared with a jsp-file attribute. However, tomcat actually
uses the init-param "jspFile" on a copy of the JspServlet with the name of the
target jsp instead.

If a container sets this attribute as per the comment, it can cause stack
overflow when jsp including is used:

 a.jsp is defined in a jsp-file on a servlet in web.xml
 a.jsp includes b.jsp

When a.jsp is serviced it does an include dispatch to b.jsp. When the
JspServlet is called for b.jsp, it sees that the request attribute with a.jsp
is set, so processes it again ... which does an include dispatch for b.jsp ...
which causes a.jsp to be processed again  and then rinse and repeat.

Note that Glassfish nulls out this attribute after it has been detected:

  if (jspFile != null) {
// JSP is specified via  in  declaration
jspUri = jspFile;
request.removeAttribute(Constants.JSP_FILE);
} else {

Jan

-- 
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



[Bug 55524] Deadlock produced during Websocket write operation (org.apache.catalina.websocket.WsOutbound)

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55524

--- Comment #10 from Violeta Georgieva  ---
(In reply to Dmitry Treskunov from comment #9)
> Looking at the changelog
> http://tomcat.apache.org/tomcat-7.0-doc/changelog.html I see that 
> 
> "Avoid a possible deadlock when one thread is shutting down a connection
> while another thread is trying to write to it. (markt)"
> 
> was included in 7.0.53, but not in 7.0.43
> 
> Am I right?

No

This fix was included in 7.0.43. See [1]

Regards,
Violeta

[1] 7.0.43 changelog - 55524: Refactor to avoid a possible deadlock when
handling an IOException during output when using Tomcat' proprietary (and
deprecated) WebSocket API. (markt)

-- 
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



Re: [Bug 56739] Error response body generated only occasionally

2014-09-17 Thread Violeta Georgieva
Hi,

2014-08-07 11:53 GMT+03:00 :
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=56739
>
> Mark Thomas  changed:
>
>What|Removed |Added
>

>   Component|Catalina|Catalina
> Version|8.0.9   |7.0.55
> Product|Tomcat 8|Tomcat 7
>Target Milestone||---
>
> --- Comment #4 from Mark Thomas  ---
> This has been fixed in 8.0.x for 8.0.11 onwards.
>
> I'm going to leave it a little while to give folks a chance to review the
> changes before back-porting it to 7.0.x.

Can I port this to 7.0.x or we need more time for user feedback?

Thanks,
Violeta

>
> --
> 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: r1625878 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/ java/org/apache/tomcat/websocket/server/ webapps/docs/

2014-09-17 Thread violetagg
Author: violetagg
Date: Thu Sep 18 02:14:10 2014
New Revision: 1625878

URL: http://svn.apache.org/r1625878
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56982
Merged revision(s) 1624984 from tomcat/trunk:
Return the actual negotiated extensions rather than an empty list for 
Session.getNegotiatedExtensions()

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java?rev=1625878&r1=1625877&r2=1625878&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java Thu 
Sep 18 02:14:10 2014
@@ -75,6 +75,7 @@ public class WsSession implements Sessio
 private final Principal userPrincipal;
 private final EndpointConfig endpointConfig;
 
+private final List negotiatedExtensions;
 private final String subProtocol;
 private final Map pathParameters;
 private final boolean secure;
@@ -106,6 +107,7 @@ public class WsSession implements Sessio
  *
  * @param localEndpoint
  * @param wsRemoteEndpoint
+ * @param negotiatedExtensions
  * @throws DeploymentException
  */
 public WsSession(Endpoint localEndpoint,
@@ -113,7 +115,7 @@ public class WsSession implements Sessio
 WsWebSocketContainer wsWebSocketContainer,
 URI requestUri, Map> requestParameterMap,
 String queryString, Principal userPrincipal, String httpSessionId,
-String subProtocol, Map pathParameters,
+List negotiatedExtensions, String subProtocol, 
Map pathParameters,
 boolean secure, EndpointConfig endpointConfig) throws 
DeploymentException {
 this.localEndpoint = localEndpoint;
 this.wsRemoteEndpoint = wsRemoteEndpoint;
@@ -139,6 +141,7 @@ public class WsSession implements Sessio
 this.queryString = queryString;
 this.userPrincipal = userPrincipal;
 this.httpSessionId = httpSessionId;
+this.negotiatedExtensions = negotiatedExtensions;
 if (subProtocol == null) {
 this.subProtocol = "";
 } else {
@@ -303,7 +306,7 @@ public class WsSession implements Sessio
 @Override
 public List getNegotiatedExtensions() {
 checkState();
-return Collections.emptyList();
+return negotiatedExtensions;
 }
 
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1625878&r1=1625877&r2=1625878&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
Thu Sep 18 02:14:10 2014
@@ -348,8 +348,8 @@ public class WsWebSocketContainer
 WsRemoteEndpointImplClient wsRemoteEndpointClient = new 
WsRemoteEndpointImplClient(channel);
 
 WsSession wsSession = new WsSession(endpoint, wsRemoteEndpointClient,
-this, null, null, null, null, null, subProtocol,
-Collections.emptyMap(), secure,
+this, null, null, null, null, null, 
Collections.emptyList(),
+subProtocol, Collections.emptyMap(), secure,
 clientEndpointConfiguration);
 
 WsFrameClient wsFrameClient = new WsFrameClient(response, channel,

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java?rev=1625878&r1=1625877&r2=1625878&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java 
Thu Sep 18 02:14:10 2014
@@ -19,6 +19,7 @@ package org.apache.tomcat.websocket.serv
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
+import java.util.Collections;
 

buildbot success in ASF Buildbot on tomcat-trunk

2014-09-17 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/465

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

Buildslave for this Build: bb-vm_ubuntu

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

Build succeeded!

sincerely,
 -The Buildbot




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



[Bug 56953] A improvement for "DataInputStream"

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56953

--- Comment #18 from hzha...@ebay.com ---
Thanks for your advice.
These points are extremely wise.

(In reply to Konstantin Kolinko from comment #15)
> OK, this is better.
> 
> 1. Formatting: the code shall not use tab characters
> 
> 2. In "skipBytes(int n)":  there is no reason to call "fillNew()" after
> calling "in.skip(n - sum)" on the underlying stream. If another skip call
> follows then there is no point in filling the buffer.
> 
> 3. "<< 0" shift operation is NOOP and can be removed.
> 
> 4. I wonder whether "ch + ch" or "ch | ch" works better. In theory the
> latter should be faster, but I guess there is no measurable difference
> nowadays.
> 
> 5. In uninmplemented readLine() method: maybe better throw new
> java.lang.UnsupportedOperationException() instead of IOException.

-- 
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: r1625855 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/windows-auth-howto.xml

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 23:41:23 2014
New Revision: 1625855

URL: http://svn.apache.org/r1625855
Log:
After double-checking SPN to domain user is a one to one mapping

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml

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

Modified: tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml?rev=1625855&r1=1625854&r2=1625855&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml Wed Sep 17 
23:41:23 2014
@@ -64,9 +64,7 @@ debug logs in this case.
 intranet.
 The SPN does not have to start with HTTP but the SPN must be the same in 
all
 the files it is used.
-If you want multiple SPNs mapped to the same domain user then each SPN must
-use a unique prefix such as HTTP01/..., HTTP02/...,
-etc.
+No more than one SPN may be mapped to a domain user.
 
 The areas where further testing is required include:
 



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



svn commit: r1625854 - /tomcat/trunk/webapps/docs/windows-auth-howto.xml

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 23:40:48 2014
New Revision: 1625854

URL: http://svn.apache.org/r1625854
Log:
After double-checking SPN to domain user is a one to one mapping

Modified:
tomcat/trunk/webapps/docs/windows-auth-howto.xml

Modified: tomcat/trunk/webapps/docs/windows-auth-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/windows-auth-howto.xml?rev=1625854&r1=1625853&r2=1625854&view=diff
==
--- tomcat/trunk/webapps/docs/windows-auth-howto.xml (original)
+++ tomcat/trunk/webapps/docs/windows-auth-howto.xml Wed Sep 17 23:40:48 2014
@@ -64,9 +64,7 @@ debug logs in this case.
 intranet.
 The SPN does not have to start with HTTP but the SPN must be the same in 
all
 the files it is used.
-If you want multiple SPNs mapped to the same domain user then each SPN must
-use a unique prefix such as HTTP01/..., HTTP02/...,
-etc.
+No more than one SPN may be mapped to a domain user.
 
 The areas where further testing is required include:
 



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



svn commit: r1625842 - /tomcat/trunk/webapps/docs/windows-auth-howto.xml

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 22:45:58 2014
New Revision: 1625842

URL: http://svn.apache.org/r1625842
Log:
Answer an outstanding question and add some additional info

Modified:
tomcat/trunk/webapps/docs/windows-auth-howto.xml

Modified: tomcat/trunk/webapps/docs/windows-auth-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/windows-auth-howto.xml?rev=1625842&r1=1625841&r2=1625842&view=diff
==
--- tomcat/trunk/webapps/docs/windows-auth-howto.xml (original)
+++ tomcat/trunk/webapps/docs/windows-auth-howto.xml Wed Sep 17 22:45:58 2014
@@ -62,11 +62,15 @@ exactly else authentication will fail. A
 debug logs in this case.
 The client must be of the view that the server is part of the local trusted
 intranet.
+The SPN does not have to start with HTTP but the SPN must be the same in 
all
+the files it is used.
+If you want multiple SPNs mapped to the same domain user then each SPN must
+use a unique prefix such as HTTP01/..., HTTP02/...,
+etc.
 
 The areas where further testing is required include:
 
 Does the domain name have to be in upper case?
-Does the SPN have to start with HTTP/...?
 Can a port number be appended to the end of the host in the SPN?
 Can the domain be left off the user in the ktpass command?
 What are the limitations on the account that Tomcat can run as? SPN



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



svn commit: r1625843 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/windows-auth-howto.xml

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 22:46:26 2014
New Revision: 1625843

URL: http://svn.apache.org/r1625843
Log:
Answer an outstanding question and add some additional info

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml

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

Modified: tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml?rev=1625843&r1=1625842&r2=1625843&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml Wed Sep 17 
22:46:26 2014
@@ -62,11 +62,15 @@ exactly else authentication will fail. A
 debug logs in this case.
 The client must be of the view that the server is part of the local trusted
 intranet.
+The SPN does not have to start with HTTP but the SPN must be the same in 
all
+the files it is used.
+If you want multiple SPNs mapped to the same domain user then each SPN must
+use a unique prefix such as HTTP01/..., HTTP02/...,
+etc.
 
 The areas where further testing is required include:
 
 Does the domain name have to be in upper case?
-Does the SPN have to start with HTTP/...?
 Can a port number be appended to the end of the host in the SPN?
 Can the domain be left off the user in the ktpass command?
 What are the limitations on the account that Tomcat can run as? SPN



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



[Bug 56990] New: ant ide-eclipse target shall download easymock library

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56990

Bug ID: 56990
   Summary: ant ide-eclipse target shall download easymock library
   Product: Tomcat 8
   Version: 8.0.12
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Meta
  Assignee: dev@tomcat.apache.org
  Reporter: knst.koli...@gmail.com

When configuring Eclipse project for Tomcat 8 via "ant ide-eclipse" command, as
documented at [1], it does not download easymock library. The library is
referenced in res/ide-support/eclipse/eclipse.classpath file.

[1] http://tomcat.apache.org/tomcat-8.0-doc/building.html

This issue was originally reported via documentation comments system at [1].

The "ide-eclipse" target downloads libraries used by build and by extras, but
it does not download libraries used by test target.

-- 
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: r1625837 - /tomcat/tc6.0.x/trunk/BUILDING.txt

2014-09-17 Thread kkolinko
Author: kkolinko
Date: Wed Sep 17 22:17:28 2014
New Revision: 1625837

URL: http://svn.apache.org/r1625837
Log:
CTR: Documentation
Add a note about creating release builds on non-Windows platforms.
It is port of r1553126.

Modified:
tomcat/tc6.0.x/trunk/BUILDING.txt

Modified: tomcat/tc6.0.x/trunk/BUILDING.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/BUILDING.txt?rev=1625837&r1=1625836&r2=1625837&view=diff
==
--- tomcat/tc6.0.x/trunk/BUILDING.txt (original)
+++ tomcat/tc6.0.x/trunk/BUILDING.txt Wed Sep 17 22:17:28 2014
@@ -164,5 +164,11 @@ For a quick rebuild of only modified cod
 
 (7) Building a release:
 
+A full release includes the Windows installer which requires a Windows
+environment to be available to create it. If not building in a Windows
+environment, the build scripts assume that WINE is available. If this is 
not
+the case, the skip.installer property may be set to skip the creation of 
the
+Windows installer.
+
 cd ${tomcat.source}
 ant -f dist.xml release



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



svn commit: r1625827 - /tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 21:12:33 2014
New Revision: 1625827

URL: http://svn.apache.org/r1625827
Log:
Fix typo

Modified:
tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml

Modified: tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml?rev=1625827&r1=1625826&r2=1625827&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml Wed Sep 17 21:12:33 
2014
@@ -43,17 +43,17 @@
 org/apache/tomcat/util/net/**
 org/apache/tomcat/util/scan/**
   
-  
-org/apache/tomcat/util/bcel/**
-org/apache/tomcat/util/collections/**
-org/apache/tomcat/util/descriptor/**
-org/apache/tomcat/util/digester/**
-org/apache/tomcat/util/http/**
-org/apache/tomcat/util/log/**
-org/apache/tomcat/util/modeler/**
-org/apache/tomcat/util/net/**
-org/apache/tomcat/util/scan/**
-  
+  
+org/apache/tomcat/util/bcel/**
+org/apache/tomcat/util/collections/**
+org/apache/tomcat/util/descriptor/**
+org/apache/tomcat/util/digester/**
+org/apache/tomcat/util/http/**
+org/apache/tomcat/util/log/**
+org/apache/tomcat/util/modeler/**
+org/apache/tomcat/util/net/**
+org/apache/tomcat/util/scan/**
+  
 
   
 



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



Re: svn commit: r1625825 - /tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/

2014-09-17 Thread Mark Thomas
On 17/09/2014 21:57, ma...@apache.org wrote:
> Author: markt
> Date: Wed Sep 17 20:57:12 2014
> New Revision: 1625825
> 
> URL: http://svn.apache.org/r1625825
> Log:
> Add an external for util

All,

Sorry for the noise. It looks like my working copy is corrupted. A fresh
checkout is fine.

Mark


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



svn commit: r1625825 - /tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:57:12 2014
New Revision: 1625825

URL: http://svn.apache.org/r1625825
Log:
Add an external for util

Modified:

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/  
 (props changed)

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 20:57:12 2014
@@ -0,0 +1 @@
+^/tomcat/trunk/test/org/apache/tomcat/util util



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



svn commit: r1625824 - in /tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache: ./ tomcat/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:56:12 2014
New Revision: 1625824

URL: http://svn.apache.org/r1625824
Log:
Restore packages

Added:
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/


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



svn commit: r1625823 - /tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:54:53 2014
New Revision: 1625823

URL: http://svn.apache.org/r1625823
Log:
Re-add org packag

Added:
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/


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



svn commit: r1625818 - /tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:50:45 2014
New Revision: 1625818

URL: http://svn.apache.org/r1625818
Log:
Still not sure what is going on. Try deleting more stuff to clean things up.

Removed:
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/


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



[Bug 56397] Establish parallel Maven-based build process

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397

--- Comment #16 from Pierre Viret  ---
I've just figured out where you have performed the changes
(tomcat/sandbox/trunk-maven-layout/) so I will be able to check this out on
Friday.

Regarding the tests: I have not tried to integrate the tests in the maven
components yet. A good practice in maven is to split the integration tests in
separate components which are built & tested late in the build cycle, when all
base components are already built and can be referenced. Only the real unit
tests, which run quickly (if they last more than a couple of seconds then we
risk that the developers skip them...) should be integrated in the
corresponding component and so the developer get at once a feedback if
something is broken at this level.
If some test classes are widely used then a solution is to create a
"common-test" component containing all these utility classes which is then
added as dependency (with scope ) in the other components.
One other (quick & dirty) solution would be to create one single test component
and put all the tests there, but I think this should only be used in a "first
throw" and that we should integrate the real unit-tests in the corresponding
components as soon as possible.

-- 
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: r1625811 - /tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:39:04 2014
New Revision: 1625811

URL: http://svn.apache.org/r1625811
Log:
Add an external for util

Modified:

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/  
 (props changed)

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 20:39:04 2014
@@ -0,0 +1 @@
+^/tomcat/trunk/test/org/apache/tomcat/util util



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



svn commit: r1625808 - in /tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org: ./ apache/ apache/tomcat/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:37:06 2014
New Revision: 1625808

URL: http://svn.apache.org/r1625808
Log:
Restore packages

Added:
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/


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



svn commit: r1625810 - /tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:37:37 2014
New Revision: 1625810

URL: http://svn.apache.org/r1625810
Log:
Add an external for util

Modified:

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/  
 (props changed)

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 20:37:37 2014
@@ -0,0 +1 @@
+^/tomcat/trunk/java/org/apache/tomcat/util util



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



svn commit: r1625807 - /tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:36:17 2014
New Revision: 1625807

URL: http://svn.apache.org/r1625807
Log:
Still not sure what is going on. Try deleting more stuff to clean things up.

Removed:
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/


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



[Bug 56397] Establish parallel Maven-based build process

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397

--- Comment #15 from Pierre Viret  ---
Here my answers to the first comment:

Working with the source:
1. How do you propose to update the version number after a release? Updating
every POM by hand is not viable.

--> I use the maven-versions-plugin with several big projects for this
(http://mojo.codehaus.org/versions-maven-plugin). The goal versions:set is
exactly what we need and this works very well. But if you have some
inconsistency in the versions of your project hierarchy you have to fix them by
hand.

2. The JARs need to contain the right LICENSE and NOTICE file. Even if they
aren't meant to be released, someone will distribute them somewhere, somehow.

--> this should not be a big issue. There are several ays to achieve this, I
think that one good solution is too define a component containing global
ressources, each component needing these files depends on this one and can pull
the files using dependency-plugin in the generate-resources phase. Another
solution would be to add the files as ressource in each component using svn
externals, into src/main/resources dir of the component then the files are
added to the jar. But on my opinion the first solution is easier.

Working instance:
3. How do we get to this point?

--> Is the working instance what the ant build generates under "output/build" ?
Actually what I have begun to implement for generating the distributions is
quite the same as the working instance I think.

Distribution:
4. Can source JARs are be created?

--> yes this is easy

5. Windows installer, signing etc.

--> I have no experience with Windows installer. Signing should not be a
problem. 
It is possible to perform some steps in the maven build using ant targets so
everything we can do with ant should be possible with maven. I have used this
(the maven-antrun-plugin) for a project where we call some ant tasks of
Weblogic Server to generate Security Providers.


I will have again time to work on this Friday afternoon. Are you working on
some branch in svn for the svn externals ? How should I checkout the sources to
get what you have implemented for JULI ? I have checkout the trunk but I didn't
see anything about externals references.

-- 
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: r1625804 - in /tomcat/sandbox/trunk-maven-layout/tomcat-util/src: main/java/org/apache/tomcat/ test/java/org/apache/tomcat/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:28:07 2014
New Revision: 1625804

URL: http://svn.apache.org/r1625804
Log:
Remove externals while I try and figure out strange svn errors

Modified:

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/  
 (props changed)

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/  
 (props changed)

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/
('svn:externals' removed)

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/
('svn:externals' removed)



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



svn commit: r1625797 - in /tomcat/sandbox/trunk-maven-layout/tomcat-util: pom.xml src/test/java/org/apache/tomcat/ src/test/java/org/apache/tomcat/util/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:10:59 2014
New Revision: 1625797

URL: http://svn.apache.org/r1625797
Log:
Simplify externals

Removed:

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/util/
Modified:
tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/  
 (props changed)

Modified: tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml?rev=1625797&r1=1625796&r2=1625797&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml Wed Sep 17 20:10:59 
2014
@@ -43,6 +43,17 @@
 org/apache/tomcat/util/net/**
 org/apache/tomcat/util/scan/**
   
+  
+org/apache/tomcat/util/bcel/**
+org/apache/tomcat/util/collections/**
+org/apache/tomcat/util/descriptor/**
+org/apache/tomcat/util/digester/**
+org/apache/tomcat/util/http/**
+org/apache/tomcat/util/log/**
+org/apache/tomcat/util/modeler/**
+org/apache/tomcat/util/net/**
+org/apache/tomcat/util/scan/**
+  
 
   
 

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 20:10:59 2014
@@ -0,0 +1 @@
+^/tomcat/trunk/test/org/apache/tomcat/util util



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



Re: svn commit: r1625794 - in /tomcat/sandbox/trunk-maven-layout/tomcat-util: pom.xml src/main/java/org/apache/tomcat/

2014-09-17 Thread Konstantin Kolinko
2014-09-18 0:03 GMT+04:00  :
> Author: markt
> Date: Wed Sep 17 20:03:26 2014
> New Revision: 1625794
>
> URL: http://svn.apache.org/r1625794
> Log:
> Simplify externals
>
> Modified:
> tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml
> 
> tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/
>(props changed)
>
> Modified: tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml
> URL: 
> http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml?rev=1625794&r1=1625793&r2=1625794&view=diff
> ==
> --- tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml (original)
> +++ tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml Wed Sep 17 20:03:26 
> 2014
> @@ -27,6 +27,27 @@
>tomcat-util
>Common code shared by multiple Tomcat components
>
> +  
> +
> +  
> +maven-compiler-plugin
> +
> +  
> +org/apache/tomcat/util/bcel/**
> +org/apache/tomcat/util/collections/**
> +org/apache/tomcat/util/descriptor/**
> +org/apache/tomcat/util/digester/**
> +org/apache/tomcat/util/http/**
> +org/apache/tomcat/util/log/**
> +org/apache/tomcat/util/modeler/**
> +org/apache/tomcat/util/net/**
> +org/apache/tomcat/util/scan/**
> +  
> +
> +  
> +
> +  

Just using excludes seems fragile.
In build.xml we have both includes and excludes

  
















  



>
>
>  
>
> Propchange: 
> tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/
> --
> --- svn:externals (original)
> +++ svn:externals Wed Sep 17 20:03:26 2014
> @@ -1,10 +1 @@
> -^/tomcat/trunk/java/org/apache/tomcat/util/Diagnostics.java Diagnostics.java
> -^/tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java 
> ExceptionUtils.java
> -^/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java 
> IntrospectionUtils.java
> -^/tomcat/trunk/java/org/apache/tomcat/util/LocalStrings.properties 
> LocalStrings.properties
> -^/tomcat/trunk/java/org/apache/tomcat/util/buf buf
> -^/tomcat/trunk/java/org/apache/tomcat/util/codec codec
> -^/tomcat/trunk/java/org/apache/tomcat/util/file file
> -^/tomcat/trunk/java/org/apache/tomcat/util/res res
> -^/tomcat/trunk/java/org/apache/tomcat/util/security security
> -^/tomcat/trunk/java/org/apache/tomcat/util/threads threads
> +^/tomcat/trunk/java/org/apache/tomcat/util util
>
>
>
> -
> 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: r1625794 - in /tomcat/sandbox/trunk-maven-layout/tomcat-util: pom.xml src/main/java/org/apache/tomcat/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 20:03:26 2014
New Revision: 1625794

URL: http://svn.apache.org/r1625794
Log:
Simplify externals

Modified:
tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/  
 (props changed)

Modified: tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml?rev=1625794&r1=1625793&r2=1625794&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml Wed Sep 17 20:03:26 
2014
@@ -27,6 +27,27 @@
   tomcat-util
   Common code shared by multiple Tomcat components
 
+  
+
+  
+maven-compiler-plugin
+
+  
+org/apache/tomcat/util/bcel/**
+org/apache/tomcat/util/collections/**
+org/apache/tomcat/util/descriptor/**
+org/apache/tomcat/util/digester/**
+org/apache/tomcat/util/http/**
+org/apache/tomcat/util/log/**
+org/apache/tomcat/util/modeler/**
+org/apache/tomcat/util/net/**
+org/apache/tomcat/util/scan/**
+  
+
+  
+
+  
+
   
 
 

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/
--
--- svn:externals (original)
+++ svn:externals Wed Sep 17 20:03:26 2014
@@ -1,10 +1 @@
-^/tomcat/trunk/java/org/apache/tomcat/util/Diagnostics.java Diagnostics.java
-^/tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java 
ExceptionUtils.java
-^/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java 
IntrospectionUtils.java
-^/tomcat/trunk/java/org/apache/tomcat/util/LocalStrings.properties 
LocalStrings.properties
-^/tomcat/trunk/java/org/apache/tomcat/util/buf buf
-^/tomcat/trunk/java/org/apache/tomcat/util/codec codec
-^/tomcat/trunk/java/org/apache/tomcat/util/file file
-^/tomcat/trunk/java/org/apache/tomcat/util/res res
-^/tomcat/trunk/java/org/apache/tomcat/util/security security
-^/tomcat/trunk/java/org/apache/tomcat/util/threads threads
+^/tomcat/trunk/java/org/apache/tomcat/util util



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



[Bug 56397] Establish parallel Maven-based build process

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397

--- Comment #14 from Mark Thomas  ---
For the record a narrow as possible single external combined with
include/exclude filters in the POM looks like a good solution. I'll update the
existing modules that use multiple externals to use this approach.

A new problem has emerged. The unit tests (which in many cases are more like
integration tests) have all sorts of circular dependencies. Suggestions on how
to handle this welcome.

-- 
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: r1625785 - in /tomcat/sandbox/trunk-maven-layout/tomcat-api: pom.xml src/main/java/org/apache/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 19:48:22 2014
New Revision: 1625785

URL: http://svn.apache.org/r1625785
Log:
CComplete tomcat-api module with a combination of a simple external and a 
filter in the POM

Modified:
tomcat/sandbox/trunk-maven-layout/tomcat-api/pom.xml
tomcat/sandbox/trunk-maven-layout/tomcat-api/src/main/java/org/apache/   
(props changed)

Modified: tomcat/sandbox/trunk-maven-layout/tomcat-api/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-api/pom.xml?rev=1625785&r1=1625784&r2=1625785&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/tomcat-api/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/tomcat-api/pom.xml Wed Sep 17 19:48:22 
2014
@@ -29,11 +29,24 @@
 Definition of interfaces shared by Catalina and 
Jasper
 http://tomcat.apache.org/
 
-  
-
-  org.apache.tomcat
-  tomcat-servlet-api
-
-  
+
+
+
+maven-compiler-plugin
+
+
+org/apache/tomcat/*.java
+
+
+
+
+
+
+
+
+org.apache.tomcat
+tomcat-servlet-api
+
+
 
 

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-api/src/main/java/org/apache/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 19:48:22 2014
@@ -0,0 +1 @@
+^/tomcat/trunk/java/org/apache/tomcat tomcat



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



svn commit: r1625781 - in /tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api: pom.xml src/test/java/ src/test/java/javax/ src/test/javax/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 19:47:19 2014
New Revision: 1625781

URL: http://svn.apache.org/r1625781
Log:
Fix test path
Tests have circular dependencies so skip the for this module

Added:
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/test/java/
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/test/java/javax/   
(props changed)
  - copied from r1625775, 
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/test/javax/
Removed:
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/test/javax/
Modified:
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml

Modified: tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml?rev=1625781&r1=1625780&r2=1625781&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml Wed Sep 17 
19:47:19 2014
@@ -70,9 +70,23 @@
   
 javax/servlet/jsp/**
   
+  
+  
+javax/servlet/**
+  
 
   
 
   
-
+
+  
+
+
+  junit
+  junit
+  test
+
+
+  
+
 

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/test/java/javax/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 19:47:19 2014
@@ -0,0 +1 @@
+^/tomcat/trunk/test/javax/servlet servlet



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



[Bug 56989] Classes being loaded from wrong web app.

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56989

--- Comment #4 from Konstantin Kolinko  ---
You may try running with a debugger
http://wiki.apache.org/tomcat/FAQ/Developing#Debugging

With a breakpoint in static method SecurityContextHolder.initialize(). It may
be interesting to know what stack trace will be at that point and what class
loaders will be invoked.

> c) When a request next goes to war2, the SecurityContextHolder class for
> war2 is loaded from the war2 (correctly) but it's static field STILL
> points to the strategy object created in (b), from war1!

That would mean that the interface (the class used to declare the static field)
were also loaded from "war1".

There is no reflection API in use here (neither when declaring field, nor when
creating strategy instance - it is created with Java "new" operator), so it
will be loaded from the same class loader that loaded the calling class. So how
can it be loaded from different war? What jars are in this classloader's class
path?

-- 
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: r1625775 - in /tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api: pom.xml src/main/java/javax/ src/test/ src/test/javax/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 19:29:11 2014
New Revision: 1625775

URL: http://svn.apache.org/r1625775
Log:
Complete tomcat-servlet-api module with a combination of a simple external and 
a filter in the POM

Added:
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/test/
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/test/javax/   
(with props)
Modified:
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/main/java/javax/   
(props changed)

Modified: tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml?rev=1625775&r1=1625774&r2=1625775&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml Wed Sep 17 
19:29:11 2014
@@ -62,4 +62,17 @@
 
   
 
+  
+
+  
+maven-compiler-plugin
+
+  
+javax/servlet/jsp/**
+  
+
+  
+
+  
+
 

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/main/java/javax/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 19:29:11 2014
@@ -0,0 +1 @@
+^/tomcat/trunk/java/javax/servlet servlet

Propchange: tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/test/javax/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 19:29:11 2014
@@ -0,0 +1 @@
+^/tomcat/trunk/test/javax/servlet test



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



svn commit: r1625774 - in /tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src: ./ main/ main/java/ main/java/javax/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 19:22:55 2014
New Revision: 1625774

URL: http://svn.apache.org/r1625774
Log:
Start work on sevrlet-api

Added:
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/main/
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/main/java/
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/src/main/java/javax/


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



svn commit: r1625773 - in /tomcat/sandbox/trunk-maven-layout/tomcat-api/src: ./ main/ main/java/ main/java/org/ main/java/org/apache/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 19:18:57 2014
New Revision: 1625773

URL: http://svn.apache.org/r1625773
Log:
Start work on tomcat-api module

Added:
tomcat/sandbox/trunk-maven-layout/tomcat-api/src/
tomcat/sandbox/trunk-maven-layout/tomcat-api/src/main/
tomcat/sandbox/trunk-maven-layout/tomcat-api/src/main/java/
tomcat/sandbox/trunk-maven-layout/tomcat-api/src/main/java/org/
tomcat/sandbox/trunk-maven-layout/tomcat-api/src/main/java/org/apache/


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



svn commit: r1625769 - /tomcat/trunk/build.xml

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 19:17:28 2014
New Revision: 1625769

URL: http://svn.apache.org/r1625769
Log:
Avoid creating empty package in JAR

Modified:
tomcat/trunk/build.xml

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1625769&r1=1625768&r2=1625769&view=diff
==
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Wed Sep 17 19:17:28 2014
@@ -338,6 +338,7 @@
   
 
 
+
 
 
 



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



[Bug 56989] Classes being loaded from wrong web app.

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56989

--- Comment #3 from Mel Martinez  ---
Sigh.  Some typos.  I wish Bugzilla allowed us to edit comments.
- should be

The issue is that

a) the SecurityContextHolder class has a static reference to a 'strategy'
object.
b) When a request goes to war1 the SecurityContextHolder class is loaded from
war1, initialized and the strategy object is created out of the classes in
war1.
c) When a request next goes to war2, the SecurityContextHolder class for war2
is loaded from the war2 (correctly) but it's static field STILL points to the
strategy object created in (b), from war1!
d) Because the strategy object was loaded from war1, when it's
"createEmptyContext()" method is called, it creates a SecurityContextImpl
instance using the class for that from war1.
e) Finally, this will "fail" when you attempt to use this object within war2
because assigning it to a reference of type SecurityContext will throw a
ClassCastException.

-- 
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



[Bug 56989] Classes being loaded from wrong web app.

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56989

--- Comment #2 from Mel Martinez  ---
Hi Konstantin,

Thanks for your quick response on this topic.

I will try to find the time to throw together a pair of sample web apps that
will reproduce the problem (I cannot provide our actual project code).  That
may not happen for a day or two.

I am not expecting support at all and I would hope that would be clear from the
details I have provided. I have a workaround for the problem already as
indicated in my report.  I am posting this bug report so that the Tomcat
committers are aware that they have a very serious bug in the class loader
implementation.

The use of a ThreadLocal by the Spring code is not the issue.  The ThreadLocal
is being properly cleared at the termination of each request during the
execution of the finally clause in the SecurityContextPersistenceFilter.  This
is a class loader isolation issue.

The issue is that

a) the SecurityContextHolder class has a static reference to a 'strategy'
object.
b) When a request goes to war1 the SecurityContext class is loaded from war1,
initialized and the strategy object is created out of the classes in war1.
c) When a request next goes to war2, the SecurityContext class for war2 is
loaded from the war2 (correctly) but it's static field STILL points to the
strategy object created in (b), from war1!
d) Because the strategy object was loaded from war1, when it's
"createEmptyContext()" method is called, it creates a SecurityContextImpl
instance using the class for that from war1.
e) Finally, this will "fail" when you attempt to use this object within war2
because assigning it to a reference of type SecurityContext will throw a
ClassCastException.

It will throw the ClassCastException because the object implements the
SecurityContext interface from war1, not war2.

The core problem is in step "c" :  Why is the static field for the
SecurityContextHolder class in war2 pointing to the strategy object from war1?

A static field should belong to a class.  The SecurityContextHolder class in
each war are, as we both agree, supposed to be separate classes.  So they are
supposed to have completely separate static fields.

Thanks again for your attention to this.

-- 
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



[Bug 56397] Establish parallel Maven-based build process

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397

--- Comment #13 from Mark Thomas  ---
Mmm. Because of what needs to be filtered, the use of externals is going to get
painful for some modules. I'm wondering if there is a better solution.

The modules aspect of this is good. Is it possible to point a module at
standard Tomcat checkout (i.e. the full source tree) and then tell Maven to
filter that to only include the classes we want for that module? If yes, would
this work (including in an IDE) if the source tree was outside of the modules
or would you need a complete Tomcat checkout in each module?

-- 
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: r1625744 - in /tomcat/sandbox/trunk-maven-layout/tomcat-util: pom.xml src/main/java/org/apache/tomcat/ src/test/java/org/apache/tomcat/util/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 18:51:15 2014
New Revision: 1625744

URL: http://svn.apache.org/r1625744
Log:
Complete tomcat-util including tests

Modified:
tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/  
 (props changed)

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/util/
   (props changed)

Modified: tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml?rev=1625744&r1=1625743&r2=1625744&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml Wed Sep 17 18:51:15 
2014
@@ -28,16 +28,18 @@
   Common code shared by multiple Tomcat components
 
   
+
 
   org.apache.tomcat
   tomcat-juli
 
-
+
   
 
 

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/
--
--- svn:externals (original)
+++ svn:externals Wed Sep 17 18:51:15 2014
@@ -1 +1,10 @@
 ^/tomcat/trunk/java/org/apache/tomcat/util/Diagnostics.java Diagnostics.java
+^/tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java 
ExceptionUtils.java
+^/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java 
IntrospectionUtils.java
+^/tomcat/trunk/java/org/apache/tomcat/util/LocalStrings.properties 
LocalStrings.properties
+^/tomcat/trunk/java/org/apache/tomcat/util/buf buf
+^/tomcat/trunk/java/org/apache/tomcat/util/codec codec
+^/tomcat/trunk/java/org/apache/tomcat/util/file file
+^/tomcat/trunk/java/org/apache/tomcat/util/res res
+^/tomcat/trunk/java/org/apache/tomcat/util/security security
+^/tomcat/trunk/java/org/apache/tomcat/util/threads threads

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/util/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 18:51:15 2014
@@ -0,0 +1,3 @@
+^/tomcat/trunk/test/org/apache/tomcat/util/buf buf
+^/tomcat/trunk/test/org/apache/tomcat/util/res res
+^/tomcat/trunk/test/org/apache/tomcat/util/threads threads



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



svn commit: r1625737 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/server/UpgradeUtil.java

2014-09-17 Thread violetagg
Author: violetagg
Date: Wed Sep 17 18:46:38 2014
New Revision: 1625737

URL: http://svn.apache.org/r1625737
Log:
Merged revision 1623695 from tomcat/trunk:
Switch creation of the SHA-1 digest required to generate a WebSocket upgrade to 
use the ConcurrentMessageDigest rather than using a dedicated Queue.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java?rev=1625737&r1=1625736&r2=1625737&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/UpgradeUtil.java 
Wed Sep 17 18:46:38 2014
@@ -18,16 +18,12 @@ package org.apache.tomcat.websocket.serv
 
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
 
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
@@ -42,6 +38,7 @@ import javax.websocket.server.ServerEndp
 
 import org.apache.catalina.connector.RequestFacade;
 import org.apache.tomcat.util.codec.binary.Base64;
+import org.apache.tomcat.util.security.ConcurrentMessageDigest;
 import org.apache.tomcat.websocket.Constants;
 import org.apache.tomcat.websocket.Transformation;
 import org.apache.tomcat.websocket.TransformationFactory;
@@ -54,8 +51,6 @@ public class UpgradeUtil {
 private static final byte[] WS_ACCEPT =
 "258EAFA5-E914-47DA-95CA-C5AB0DC85B11".getBytes(
 StandardCharsets.ISO_8859_1);
-private static final Queue sha1Helpers =
-new ConcurrentLinkedQueue();
 
 private UpgradeUtil() {
 // Utility class. Hide default constructor.
@@ -310,19 +305,9 @@ public class UpgradeUtil {
 }
 
 
-private static String getWebSocketAccept(String key) throws 
ServletException {
-MessageDigest sha1Helper = sha1Helpers.poll();
-if (sha1Helper == null) {
-try {
-sha1Helper = MessageDigest.getInstance("SHA1");
-} catch (NoSuchAlgorithmException e) {
-throw new ServletException(e);
-}
-}
-sha1Helper.reset();
-sha1Helper.update(key.getBytes(StandardCharsets.ISO_8859_1));
-String result = 
Base64.encodeBase64String(sha1Helper.digest(WS_ACCEPT));
-sha1Helpers.add(sha1Helper);
-return result;
+private static String getWebSocketAccept(String key) {
+byte[] digest = ConcurrentMessageDigest.digestSHA1(
+key.getBytes(StandardCharsets.ISO_8859_1), WS_ACCEPT);
+return Base64.encodeBase64String(digest);
 }
 }



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



svn commit: r1625735 - in /tomcat/trunk/java/org/apache/tomcat/util/threads: Constants.java TaskThreadFactory.java

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 18:43:21 2014
New Revision: 1625735

URL: http://svn.apache.org/r1625735
Log:
Fix cyclic dependency

Modified:
tomcat/trunk/java/org/apache/tomcat/util/threads/Constants.java
tomcat/trunk/java/org/apache/tomcat/util/threads/TaskThreadFactory.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/threads/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/threads/Constants.java?rev=1625735&r1=1625734&r2=1625735&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/threads/Constants.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/threads/Constants.java Wed Sep 17 
18:43:21 2014
@@ -24,4 +24,9 @@ public final class Constants {
 public static final String Package = "org.apache.tomcat.util.threads";
 
 public static final long DEFAULT_THREAD_RENEWAL_DELAY = 1000L;
+
+/**
+ * Has security been turned on?
+ */
+public static final boolean IS_SECURITY_ENABLED = 
(System.getSecurityManager() != null);
 }

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/threads/TaskThreadFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/threads/TaskThreadFactory.java?rev=1625735&r1=1625734&r2=1625735&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/threads/TaskThreadFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/threads/TaskThreadFactory.java Wed 
Sep 17 18:43:21 2014
@@ -21,8 +21,8 @@ import java.security.PrivilegedAction;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.tomcat.util.net.Constants;
 import org.apache.tomcat.util.security.PrivilegedSetTccl;
+
 /**
  * Simple task thread factory to use to create threads for an executor
  * implementation.



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



svn commit: r1625734 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java

2014-09-17 Thread violetagg
Author: violetagg
Date: Wed Sep 17 18:41:26 2014
New Revision: 1625734

URL: http://svn.apache.org/r1625734
Log:
Merged revision 1623693 from tomcat/trunk:
Add SHA-1 support
Add support for input consisting of multiply byte arrays
(both changes are prep for switching WebSocket to use this utility class)

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java?rev=1625734&r1=1625733&r2=1625734&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java
 Wed Sep 17 18:41:26 2014
@@ -31,6 +31,7 @@ import java.util.concurrent.ConcurrentLi
 public class ConcurrentMessageDigest {
 
 private static final String MD5 = "MD5";
+private static final String SHA1 = "SHA-1";
 
 private static final Map> queues =
 new HashMap>();
@@ -44,16 +45,21 @@ public class ConcurrentMessageDigest {
 try {
 // Init commonly used algorithms
 init(MD5);
+init(SHA1);
 } catch (NoSuchAlgorithmException e) {
 throw new IllegalArgumentException(e);
 }
 }
 
-public static byte[] digestMD5(byte[] input) {
+public static byte[] digestMD5(byte[]... input) {
 return digest(MD5, input);
 }
 
-public static byte[] digest(String algorithm, byte[] input) {
+public static byte[] digestSHA1(byte[]... input) {
+return digest(SHA1, input);
+}
+
+public static byte[] digest(String algorithm, byte[]... input) {
 
 Queue queue = queues.get(algorithm);
 if (queue == null) {
@@ -71,7 +77,10 @@ public class ConcurrentMessageDigest {
 }
 }
 
-byte[] result = md.digest(input);
+for (byte[] bytes : input) {
+md.update(bytes);
+}
+byte[] result = md.digest();
 
 queue.add(md);
 



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



svn commit: r1625733 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/authenticator/ java/org/apache/catalina/realm/ java/org/apache/catalina/servlets/ java/org/apache/catalina/util/ java/org/a

2014-09-17 Thread violetagg
Author: violetagg
Date: Wed Sep 17 18:38:05 2014
New Revision: 1625733

URL: http://svn.apache.org/r1625733
Log:
Merged revision 1623685 from tomcat/trunk:
Move MessageDigest utility classes from o.a.catalina.util to 
o.a.tomcat.util.security so they are more widely available.

Added:

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java
  - copied, changed from r1623685, 
tomcat/trunk/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/security/MD5Encoder.java
  - copied, changed from r1623685, 
tomcat/trunk/java/org/apache/tomcat/util/security/MD5Encoder.java
Removed:

tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/ConcurrentMessageDigest.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/MD5Encoder.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/RealmBase.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java

tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java

tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java

tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java?rev=1625733&r1=1625732&r2=1625733&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
 Wed Sep 17 18:38:05 2014
@@ -35,12 +35,12 @@ import org.apache.catalina.LifecycleExce
 import org.apache.catalina.Realm;
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.deploy.LoginConfig;
-import org.apache.catalina.util.ConcurrentMessageDigest;
-import org.apache.catalina.util.MD5Encoder;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.buf.B2CConverter;
 import org.apache.tomcat.util.http.parser.HttpParser;
+import org.apache.tomcat.util.security.ConcurrentMessageDigest;
+import org.apache.tomcat.util.security.MD5Encoder;
 
 
 

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1625733&r1=1625732&r2=1625733&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/RealmBase.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/RealmBase.java Wed Sep 
17 18:38:05 2014
@@ -47,7 +47,6 @@ import org.apache.catalina.deploy.Securi
 import org.apache.catalina.deploy.SecurityConstraint;
 import org.apache.catalina.mbeans.MBeanUtils;
 import org.apache.catalina.util.LifecycleMBeanBase;
-import org.apache.catalina.util.MD5Encoder;
 import org.apache.catalina.util.SessionConfig;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -55,6 +54,7 @@ import org.apache.tomcat.util.buf.B2CCon
 import org.apache.tomcat.util.buf.HexUtils;
 import org.apache.tomcat.util.codec.binary.Base64;
 import org.apache.tomcat.util.res.StringManager;
+import org.apache.tomcat.util.security.MD5Encoder;
 import org.ietf.jgss.GSSContext;
 import org.ietf.jgss.GSSCredential;
 import org.ietf.jgss.GSSException;

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=1625733&r1=1625732&r2=1625733&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java 
Wed Sep 17 18:38:05 2014
@@ -51,13 +51,13 @@ import javax.xml.parsers.DocumentBuilder
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.apache.catalina.util.DOMWriter;
-import org.apache.catalina.util.MD5Encoder;
 import org.apache.catalina.util.XMLWriter;
 import org.apache.naming.resources.CacheEntry;
 import org.apache.naming.resources.Resource;
 import org.apache.naming.resources.ResourceAttributes;
 import org.apache.tomcat.util.http.FastHttpDateFormat;
 import org.apache.tomcat.util.http.Req

svn commit: r1625727 - in /tomcat/sandbox/trunk-maven-layout/tomcat-util/src: ./ main/ main/java/ main/java/org/ main/java/org/apache/ main/java/org/apache/tomcat/ main/java/org/apache/tomcat/util/ te

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 18:35:00 2014
New Revision: 1625727

URL: http://svn.apache.org/r1625727
Log:
Start on tomcat-util module

Added:
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/  
 (with props)

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/util/
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/

tomcat/sandbox/trunk-maven-layout/tomcat-util/src/test/java/org/apache/tomcat/util/

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-util/src/main/java/org/apache/tomcat/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 18:35:00 2014
@@ -0,0 +1 @@
+^/tomcat/trunk/java/org/apache/tomcat/util/Diagnostics.java Diagnostics.java



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



svn commit: r1625719 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

2014-09-17 Thread violetagg
Author: violetagg
Date: Wed Sep 17 18:06:28 2014
New Revision: 1625719

URL: http://svn.apache.org/r1625719
Log:
Merged revision 1618835 from tomcat/trunk:
Add plumbing to write reserved bits as set in the MessagePart rather
than hard-coding them to 0.
Re-order method parameters for writing header to align with RFC 6455.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1625719&r1=1625718&r2=1625719&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
 Wed Sep 17 18:06:28 2014
@@ -408,8 +408,8 @@ public abstract class WsRemoteEndpointIm
 }
 
 headerBuffer.clear();
-writeHeader(headerBuffer, mp.getOpCode(), mp.getPayload(), first,
-mp.isFin(), isMasked(), mask);
+writeHeader(headerBuffer, mp.isFin(), mp.getRsv(), mp.getOpCode(),
+isMasked(), mp.getPayload(), mask, first);
 headerBuffer.flip();
 
 if (getBatchingAllowed() || isMasked()) {
@@ -620,20 +620,22 @@ public abstract class WsRemoteEndpointIm
 protected abstract boolean isMasked();
 protected abstract void doClose();
 
-private static void writeHeader(ByteBuffer headerBuffer, byte opCode,
-ByteBuffer payload, boolean first, boolean last, boolean masked,
-byte[] mask) {
+private static void writeHeader(ByteBuffer headerBuffer, boolean fin,
+int rsv, byte opCode, boolean masked, ByteBuffer payload,
+byte[] mask, boolean first) {
 
 byte b = 0;
 
-if (last) {
+if (fin) {
 // Set the fin bit
-b = -128;
+b -= 128;
 }
 
+b += (rsv << 4);
+
 if (first) {
 // This is the first fragment of this message
-b = (byte) (b + opCode);
+b += opCode;
 }
 // If not the first fragment, it is a continuation with opCode of zero
 



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



[Bug 56989] Classes being loaded from wrong web app.

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56989

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Konstantin Kolinko  ---
Please provide a small sample web application that would reproduce the
behaviour that you are observing on a clean Tomcat installation,  so that
another person could reproduce and debug the issue.

Remember that Bugzilla is not a support forum. If you need help, you would
better ask on the users mailing list. Its audience is wider and it is more
likely to find people familiar with your configuration.


Even if both war1 and war2 create a ThreadLocal, they are different thread
locals. As far as I know, when ThreadLocals are stored in a Thread, they are
keyed by Class instance.

As war1 and war2 have different class instances, those are different
ThreadLocals, and cannot interfere with each other, nor can they store a class
loaded from different web application (it cannot be class-casted to
SecurityContext interface loaded from different web application).

> the above code will fail

The word "fail" can mean a lot of different things. What is the actual
behaviour that is observed? (The actual messages, stack traces etc.)

-- 
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



[Bug 56989] Classes being loaded from wrong web app.

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56989

Mel Martinez  changed:

   What|Removed |Added

 CC||m.marti...@ll.mit.edu

-- 
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



[Bug 56989] New: Classes being loaded from wrong web app.

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56989

Bug ID: 56989
   Summary: Classes being loaded from wrong web app.
   Product: Tomcat 7
   Version: 7.0.55
  Hardware: All
OS: All
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: m.marti...@ll.mit.edu

Actually a more correct description might be "Classes NOT being reloaded from
correct web app.   The following scenario results in classes loaded from one
web app showing up in another web app, in place of the correct classes that
should have been loaded from the latter.  The example uses Spring Security to
demonstrate the problem, but after examining the Spring code I don't believe it
is the problem at all and the problem can be produced in other code.

Scenario:

Two web apps deployed into the same Tomcat container, "war1" and "war2".  The
server.xml is configured to use mutual SSL on the connector so requests must
have an acceptable x509 certificate to get through.

Inside each war is a copy of the Spring security framework (though this can be
produced with other classes, this is easy to reproduce).  The exact version
probably doesn't matter, but in this case it was:

..tomcat/webapps/war1/WEB-INF/lib/spring-security-core-3.1.4.RELEASE.jar
..tomcat/webapps/war1/WEB-INF/lib/spring-security-web-3.1.4.RELEASE.jar

and

..tomcat/webapps/war2/WEB-INF/lib/spring-security-core-3.1.4.RELEASE.jar
..tomcat/webapps/war2/WEB-INF/lib/spring-security-web-3.1.4.RELEASE.jar

(along with associated dependencies in each case).

There are no other copies of the Spring libraries anywhere.

Both web apps declare a Spring FilterChain which, naturally, starts with the 
org.springframework.security.web.context.SecurityContextPersistenceFilter
class.

   
  
 
 
 
 
   

 
  
   

The "securityContextPersistenceFilter" is fairly simple, if you have not looked
at their source code. All it is doing is asserting that a Spring
SecurityContext object exists at the start of the request, putting it into a
ThreadLocal and then, at the end of the request, clearing it from the
ThreadLocal and saving the object in the session.

The "securityContextHolderAwareRequestFilter" is another standard Spring filter
that simply wraps the request in a wrapper that knows how to get some standard
security pieces out of the SecurityContext, if it exists and is setup.

The "myAuthenticationFilter" bean is a our own Filter that simply confirms
whether the DN of the user certificate is acceptable and if so, creates an
appropriate "org.springframework.security.core.Authentication" object that the
following servlet application will understand and places it into the
SecurityContextHolder.  Pretty standard stuff:

public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) 
throws IOException, ServletException{
//...
Authentication myAuth = //... create authentication.
SecurityContext context = SecurityContextHolder.getContext();
context.setAuthentication(myAuth);
//...
chain.doFilter(request,response);   
}

Pretty simple.

When either of the web apps is deployed alone, this works perfect.

However, when both are deployed into the same tomcat, it only works perfect for
the first web app you access with a request.

Upon sending a request to the second war, the above code will fail because the
SecurityContext object is built from classes loaded from the first war1!

Upon debugging this problem, and very carefully and using the
Class.getProtectionDomain().getCodeSource() API to printout the exact source of
each of the relevant classes involved, the following are true:

 When making the first request against war1 all classes properly load from
war1.

 When making the next request against war2:

SecurityContextHolder -> properly loaded from war2
Authentication -> properly loaded from war2
ThreadLocalSecurityContextHolderStrategy --> LOADED FROM WAR1!!!
SecurityContextImpl -> LOADED FROM WAR1!


This is bizarre and seems like an explicit violation of the specified class
loader violation.

If you flip the problem around and access war2 first after startup, then the
problem instead shows up when you subsequently try to access war2.

The way the Spring code is structured is pretty simple.

The SecurityContextPersistenceFilter makes use of static calls on the
SecurityContextHolder class to create and 'hold' the SecurityContext object.

The SecurityContextHolder has a static field called 'strategy'.  It has a
static initializer that instantiates the
ThreadLocalSecurityContextHolderStrategy and assigns it to the field.  You can
get to it with getContextHolderStrategy() accessor.

The strategy object itself maintains a ThreadLocal that is used to hold the
SecurityContext object.  It also provides the 'createEmptyCont

svn commit: r1625623 - in /tomcat/tc7.0.x/trunk: ./ BUILDING.txt

2014-09-17 Thread kkolinko
Author: kkolinko
Date: Wed Sep 17 15:03:45 2014
New Revision: 1625623

URL: http://svn.apache.org/r1625623
Log:
Add a note about creating release builds on non-Windows platforms.
It is merge of r1553126 from tomcat/trunk.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/BUILDING.txt

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

Modified: tomcat/tc7.0.x/trunk/BUILDING.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/BUILDING.txt?rev=1625623&r1=1625622&r2=1625623&view=diff
==
--- tomcat/tc7.0.x/trunk/BUILDING.txt (original)
+++ tomcat/tc7.0.x/trunk/BUILDING.txt Wed Sep 17 15:03:45 2014
@@ -265,6 +265,12 @@ You can build them by using the followin
 
 (6) Building a full release (as provided via the ASF download pages)
 
+A full release includes the Windows installer which requires a Windows
+environment to be available to create it. If not building in a Windows
+environment, the build scripts assume that WINE is available. If this is 
not
+the case, the skip.installer property may be set to skip the creation of 
the
+Windows installer.
+
  1. Configure GPG, if needed
 
 If the released artifacts have to be cryptographically signed with a



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



svn commit: r1625619 - in /tomcat/sandbox/trunk-maven-layout/tomcat-juli/src: main/java/org/apache/ test/java/org/apache/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 14:53:32 2014
New Revision: 1625619

URL: http://svn.apache.org/r1625619
Log:
Switch to externals relative to repository root as suggested by kkolinko

Modified:
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/   
(props changed)
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/test/java/org/apache/   
(props changed)

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/
--
--- svn:externals (original)
+++ svn:externals Wed Sep 17 14:53:32 2014
@@ -1 +1 @@
-../../../../../../../../trunk/java/org/apache/juli juli
+^/tomcat/trunk/java/org/apache/juli juli

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/test/java/org/apache/
--
--- svn:externals (original)
+++ svn:externals Wed Sep 17 14:53:32 2014
@@ -1 +1 @@
-../../../../../../../../trunk/test/org/apache/juli juli
+^/tomcat/trunk/test/org/apache/juli juli



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



svn commit: r1625618 - /tomcat/sandbox/trunk-maven-layout/pom.xml

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 14:52:06 2014
New Revision: 1625618

URL: http://svn.apache.org/r1625618
Log:
Add AL2 header

Modified:
tomcat/sandbox/trunk-maven-layout/pom.xml

Modified: tomcat/sandbox/trunk-maven-layout/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/pom.xml?rev=1625618&r1=1625617&r2=1625618&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/pom.xml Wed Sep 17 14:52:06 2014
@@ -1,3 +1,20 @@
+
+
 http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
 4.0.0



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



Re: svn commit: r1625596 - in /tomcat/sandbox/trunk-maven-layout/tomcat-juli/src: ./ main/ main/java/ main/java/org/ main/java/org/apache/

2014-09-17 Thread Mark Thomas
On 17/09/2014 15:29, Konstantin Kolinko wrote:
> 2014-09-17 18:06 GMT+04:00  :
>> Author: markt
>> Date: Wed Sep 17 14:06:12 2014
>> New Revision: 1625596
>>
>> URL: http://svn.apache.org/r1625596
>> Log:
>> Start populating JULI as it should have no dependencies
>>
>> Added:
>> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/
>> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/
>> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/
>> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/
>> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/  
>>  (with props)
>>
>> Propchange: 
>> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/
>> --
>> --- svn:externals (added)
>> +++ svn:externals Wed Sep 17 14:06:12 2014
>> @@ -0,0 +1 @@
>> +../../../../../../../trunk/java/org/apache/juli juli
> 
> Maybe use path relative to svn repository root? That will look like
> the following:
> ^/tomcat/trunk/java/org/apache/juli juli
> 
> Just reminding that such syntax exists. If we are going to move this
> project elsewhere we would have to exit the externals anyway.

That is cleaner and allows us to move tomcat-maven-layout around without
breaking the externals. I'll switch them.

> Also POM files need a license header.

Groan. I'll add those as I go along.

Mark


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



svn commit: r1625616 - in /tomcat/sandbox/trunk-maven-layout: pom.xml tomcat-juli/pom.xml

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 14:45:59 2014
New Revision: 1625616

URL: http://svn.apache.org/r1625616
Log:
Add junit dependency required to run unit tests

Modified:
tomcat/sandbox/trunk-maven-layout/pom.xml
tomcat/sandbox/trunk-maven-layout/tomcat-juli/pom.xml

Modified: tomcat/sandbox/trunk-maven-layout/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/pom.xml?rev=1625616&r1=1625615&r2=1625616&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/pom.xml Wed Sep 17 14:45:59 2014
@@ -169,6 +169,14 @@
 tomcat-extras-juli
 ${project.version}
 
+
+
+junit
+junit
+4.11
+test
+
+
 
 
 

Modified: tomcat/sandbox/trunk-maven-layout/tomcat-juli/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/tomcat-juli/pom.xml?rev=1625616&r1=1625615&r2=1625616&view=diff
==
--- tomcat/sandbox/trunk-maven-layout/tomcat-juli/pom.xml (original)
+++ tomcat/sandbox/trunk-maven-layout/tomcat-juli/pom.xml Wed Sep 17 14:45:59 
2014
@@ -29,6 +29,12 @@
 Tomcat Core Logging Package
 http://tomcat.apache.org/
 
-
+
+
+junit
+junit
+test
+
+
 
 



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



svn commit: r1625612 - in /tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/test: ./ java/ java/org/ java/org/apache/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 14:33:08 2014
New Revision: 1625612

URL: http://svn.apache.org/r1625612
Log:
Link in JULI test resources

Added:
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/test/
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/test/java/
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/test/java/org/
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/test/java/org/apache/   
(with props)

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/test/java/org/apache/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 14:33:08 2014
@@ -0,0 +1 @@
+../../../../../../../../trunk/test/org/apache/juli juli



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



Re: svn commit: r1625596 - in /tomcat/sandbox/trunk-maven-layout/tomcat-juli/src: ./ main/ main/java/ main/java/org/ main/java/org/apache/

2014-09-17 Thread Konstantin Kolinko
2014-09-17 18:06 GMT+04:00  :
> Author: markt
> Date: Wed Sep 17 14:06:12 2014
> New Revision: 1625596
>
> URL: http://svn.apache.org/r1625596
> Log:
> Start populating JULI as it should have no dependencies
>
> Added:
> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/
> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/
> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/
> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/
> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/   
> (with props)
>
> Propchange: 
> tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/
> --
> --- svn:externals (added)
> +++ svn:externals Wed Sep 17 14:06:12 2014
> @@ -0,0 +1 @@
> +../../../../../../../trunk/java/org/apache/juli juli

Maybe use path relative to svn repository root? That will look like
the following:
^/tomcat/trunk/java/org/apache/juli juli

Just reminding that such syntax exists. If we are going to move this
project elsewhere we would have to exit the externals anyway.

Also POM files need a license header.


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: r1625609 - /tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 14:27:03 2014
New Revision: 1625609

URL: http://svn.apache.org/r1625609
Log:
Fix the external

Modified:
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/   
(props changed)

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/
--
--- svn:externals (original)
+++ svn:externals Wed Sep 17 14:27:03 2014
@@ -1 +1 @@
-../../../../../../../trunk/java/org/apache/juli juli
+../../../../../../../../trunk/java/org/apache/juli juli



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



[Bug 56397] Establish parallel Maven-based build process

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397

--- Comment #12 from Mark Thomas  ---
I am making progress. The structure is in svn, the sources for JULI are hooked
up via externals and the tomcat-juli-8.0.13-SNAPSHOT.jar that is created looks
reasonable (I haven't tested it).

If we want this to be a way folks familiar with Maven can work with the source,
that is one thing (and I think we have most of whet we need once the svn
externals are finished).

If we want users to be able to use this to build a working Tomcat distribution,
that is is more complex.

If we want to be able to use this to build a release that is more complex
again.

Working with the source:
1. How do you propose to update the version number after a release? Updating
every POM by hand is not viable.
2. The JARs need to contain the right LICENSE and NOTICE file. Even if they
aren't meant to be released, someone will distribute them somewhere, somehow.

Working instance:
3. How do we get to this point?

Distribution:
4. Can source JARs are be created?
5. Windows installer, signing etc.

For this to be useful I think it has to be possible to create a working Tomcat
instance. I'm far less concerned about being able to release.

-- 
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



[Bug 56988] Allow to use relative paths in base.path setting when building Tomcat, e.g. "base.path=../libraries"

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56988

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 OS||All

--- Comment #1 from Konstantin Kolinko  ---
Fixed by r1625599 and r1625606. The fix will be in 8.0.12, 7.0.56 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: r1625606 - in /tomcat/tc7.0.x/trunk: ./ build.xml webapps/docs/changelog.xml

2014-09-17 Thread kkolinko
Author: kkolinko
Date: Wed Sep 17 14:17:04 2014
New Revision: 1625606

URL: http://svn.apache.org/r1625606
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56988
Allow to use relative paths in base.path setting when building Tomcat, e.g. 
"base.path=../libraries"
Use consistent naming for "inheritAll" property: Ant manual uses camelCase for 
that name.
It is port of r1625599 from tomcat/trunk.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/build.xml
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: tomcat/tc7.0.x/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1625606&r1=1625605&r2=1625606&view=diff
==
--- tomcat/tc7.0.x/trunk/build.xml (original)
+++ tomcat/tc7.0.x/trunk/build.xml Wed Sep 17 14:17:04 2014
@@ -1018,7 +1018,7 @@
 
 
 
+ inheritAll="false" target="build">
   
   
   
@@ -1058,7 +1058,7 @@
 
 
 
+ inheritAll="false" target="build-src">
   
   
   
@@ -1534,7 +1534,7 @@
 
 
+ inheritAll="false" target="compile" />
 
 
 
 
-
+
   
 
 

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=1625606&r1=1625605&r2=1625606&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Sep 17 14:17:04 2014
@@ -284,6 +284,10 @@
 catalina.bat so that escape sequences are preserved. Patch
 by Lucas Theisen. (markt)
   
+  
+56988: Allow to use relative path in base.path
+setting when building Tomcat. (kkolinko)
+  
 
   
 



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



[Bug 56923] Symlinks under WEB-INF/lib trigger a NullPointerException in StandardJarScanner

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56923

--- Comment #4 from Emmanuel Bourg  ---
Adding  to the context solved the issue, thank
you for the help Mark.

-- 
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: r1625599 - in /tomcat/trunk: build.xml webapps/docs/changelog.xml

2014-09-17 Thread kkolinko
Author: kkolinko
Date: Wed Sep 17 14:09:02 2014
New Revision: 1625599

URL: http://svn.apache.org/r1625599
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56988
Allow to use relative paths in base.path setting when building Tomcat, e.g. 
"base.path=../libraries"
Use consistent naming for "inheritAll" property: Ant manual uses camelCase for 
that name.

Modified:
tomcat/trunk/build.xml
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1625599&r1=1625598&r2=1625599&view=diff
==
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Wed Sep 17 14:09:02 2014
@@ -1094,7 +1094,7 @@
 
 
 
+ inheritAll="false" target="build">
   
   
   
@@ -1106,7 +1106,7 @@
 
 
 
+ inheritAll="false" target="build-src">
   
   
   
@@ -1586,7 +1586,7 @@
 
 
+ inheritAll="false" target="compile" />
 
 
@@ -2643,7 +2643,7 @@ Apache Tomcat ${version} native binaries
 
 
 
-
+
   
 
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1625599&r1=1625598&r2=1625599&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Sep 17 14:09:02 2014
@@ -218,6 +218,10 @@
 catalina.bat so that escape sequences are preserved. Patch
 by Lucas Theisen. (markt)
   
+  
+56988: Allow to use relative path in base.path
+setting when building Tomcat. (kkolinko)
+  
 
   
 



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



svn commit: r1625596 - in /tomcat/sandbox/trunk-maven-layout/tomcat-juli/src: ./ main/ main/java/ main/java/org/ main/java/org/apache/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 14:06:12 2014
New Revision: 1625596

URL: http://svn.apache.org/r1625596
Log:
Start populating JULI as it should have no dependencies

Added:
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/   
(with props)

Propchange: 
tomcat/sandbox/trunk-maven-layout/tomcat-juli/src/main/java/org/apache/
--
--- svn:externals (added)
+++ svn:externals Wed Sep 17 14:06:12 2014
@@ -0,0 +1 @@
+../../../../../../../trunk/java/org/apache/juli juli



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



svn commit: r1625595 - in /tomcat/sandbox/trunk-maven-layout: ./ catalina/ tomcat-annotations-api/ tomcat-api/ tomcat-catalina-ant/ tomcat-catalina-ha/ tomcat-catalina-jmx-remote/ tomcat-catalina-ws/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 14:00:48 2014
New Revision: 1625595

URL: http://svn.apache.org/r1625595
Log:
Start to look at https://issues.apache.org/bugzilla/show_bug.cgi?id=56397
Use the provided directory structure and POMs.
No svn externals to pull in source have been added at this point.

Added:
tomcat/sandbox/trunk-maven-layout/
tomcat/sandbox/trunk-maven-layout/catalina/
tomcat/sandbox/trunk-maven-layout/catalina/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-annotations-api/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-annotations-api/pom.xml   (with 
props)
tomcat/sandbox/trunk-maven-layout/tomcat-api/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-api/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-catalina/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-catalina-ant/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-catalina-ant/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-catalina-ha/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-catalina-ha/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-catalina-jmx-remote/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-catalina-jmx-remote/pom.xml   
(with props)
tomcat/sandbox/trunk-maven-layout/tomcat-catalina-ws/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-catalina-ws/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-catalina/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-coyote/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-coyote/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-dbcp/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-dbcp/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-el-api/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-el-api/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-extras-juli/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-extras-juli-adapters/   (with 
props)
tomcat/sandbox/trunk-maven-layout/tomcat-extras-juli-adapters/pom.xml   
(with props)
tomcat/sandbox/trunk-maven-layout/tomcat-extras-juli/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-jasper/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-jasper-el/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-jasper-el/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-jasper/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-jdbc/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-jdbc/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-jni/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-jni/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-jsp-api/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-jsp-api/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-juli/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-juli/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-mail-api/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-mail-api/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-servlet-api/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-spdy/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-spdy/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-tribes/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-tribes/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-util/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-util-scan/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-util-scan/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-util/pom.xml   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-websocket/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-websocket-api/   (with props)
tomcat/sandbox/trunk-maven-layout/tomcat-websocket-api/pom.xml   (with 
props)
tomcat/sandbox/trunk-maven-layout/tomcat-websocket/pom.xml   (with props)

Added: tomcat/sandbox/trunk-maven-layout/catalina/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/trunk-maven-layout/catalina/pom.xml?rev=1625595&view=auto
==
--- tomcat/sandbox/trunk-maven-layout/catalina/pom.xml (added)
+++ tomcat/sandbox/trunk-maven-layout/catalina/pom.xml Wed Sep 17 14:00:48 2014
@@ -0,0 +1,98 @@
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+4.0.

svn commit: r1625580 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/ java/org/apache/tomcat/websocket/pojo/ java/org/apache/tomcat/websocket/server/ test/org/apache/tomcat/websocket/

2014-09-17 Thread violetagg
Author: violetagg
Date: Wed Sep 17 13:27:37 2014
New Revision: 1625580

URL: http://svn.apache.org/r1625580
Log:
Merged revision 1623236 from tomcat/trunk:
Fix some checkstyle GenericWhitespace issues.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointClient.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBinary.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialText.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestUtil.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1625580&r1=1625579&r2=1625580&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
Wed Sep 17 13:27:37 2014
@@ -349,7 +349,7 @@ public class WsWebSocketContainer
 
 WsSession wsSession = new WsSession(endpoint, wsRemoteEndpointClient,
 this, null, null, null, null, null, subProtocol,
-Collections. emptyMap(), secure,
+Collections.emptyMap(), secure,
 clientEndpointConfiguration);
 
 WsFrameClient wsFrameClient = new WsFrameClient(response, channel,

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointClient.java?rev=1625580&r1=1625579&r2=1625580&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointClient.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointClient.java
 Wed Sep 17 13:27:37 2014
@@ -36,7 +36,7 @@ public class PojoEndpointClient extends 
 setPojo(pojo);
 setMethodMapping(
 new PojoMethodMapping(pojo.getClass(), decoders, null));
-setPathParameters(Collections. emptyMap());
+setPathParameters(Collections.emptyMap());
 }
 
 @Override

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBinary.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBinary.java?rev=1625580&r1=1625579&r2=1625580&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBinary.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialBinary.java
 Wed Sep 17 13:27:37 2014
@@ -25,7 +25,7 @@ import javax.websocket.Session;
  * ByteBuffer specific concrete implementation for handling partial messages.
  */
 public class PojoMessageHandlerPartialBinary
-extends PojoMessageHandlerPartialBase{
+extends PojoMessageHandlerPartialBase {
 
 public PojoMessageHandlerPartialBinary(Object pojo, Method method,
 Session session, Object[] params, int indexPayload, boolean 
convert,

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialText.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialText.java?rev=1625580&r1=1625579&r2=1625580&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialText.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerPartialText.java
 Wed Sep 17 13:27:37 2014
@@ -24,7 +24,7 @@ import javax.websocket.Session;
  * Text specific concrete implementation for handling partial messages.
  */
 public class PojoMessageHandlerPartialText
-extends PojoMessageHandlerPartialBase{
+extends PojoMessageHandlerPartialBase {
 
 public PojoMessageHandlerPartialText(Object pojo, Method method,
 Session session, Object[] params, int indexPayload, boolean 
convert,

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.j

[Bug 56923] Symlinks under WEB-INF/lib trigger a NullPointerException in StandardJarScanner

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56923

Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Mark Thomas  ---
Then that is a packaging issue for Debian to solve. A default Tomcat install
from the ASF doesn't use symlinks. It looks like the Debian folks have failed
to read the migration guide, particularly the section on Web application
resources.

-- 
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: r1625578 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/PerMessageDeflate.java java/org/apache/tomcat/websocket/server/WsServerContainer.java

2014-09-17 Thread violetagg
Author: violetagg
Date: Wed Sep 17 13:22:42 2014
New Revision: 1625578

URL: http://svn.apache.org/r1625578
Log:
Merged revisions 1621698, 1622259 from tomcat/trunk:
- Correct typo in a comment
- No need for volatile. Can be final. Reported by FindBugs.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1621698,1622259

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java?rev=1625578&r1=1625577&r2=1625578&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java 
Wed Sep 17 13:22:42 2014
@@ -51,12 +51,12 @@ public class PerMessageDeflate implement
 private final Inflater inflater = new Inflater(true);
 private final ByteBuffer readBuffer = 
ByteBuffer.allocate(Constants.DEFAULT_BUFFER_SIZE);
 private final Deflater deflater = new 
Deflater(Deflater.DEFAULT_COMPRESSION, true);
+private final byte[] EOM_BUFFER = new byte[EOM_BYTES.length + 1];
 
 private volatile Transformation next;
 private volatile boolean skipDecompression = false;
 private volatile ByteBuffer writeBuffer = 
ByteBuffer.allocate(Constants.DEFAULT_BUFFER_SIZE);
 private volatile boolean firstCompressedFrameWritten = false;
-private volatile byte[] EOM_BUFFER = new byte[EOM_BYTES.length + 1];
 
 static PerMessageDeflate negotiate(List> preferences) {
 // Accept the first preference that the server is able to support

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java?rev=1625578&r1=1625577&r2=1625578&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
 Wed Sep 17 13:22:42 2014
@@ -140,7 +140,7 @@ public class WsServerContainer extends W
 
 fr.addMappingForUrlPatterns(types, true, "/*");
 
-// Use a per web application executor for any threads the the WebSocket
+// Use a per web application executor for any threads that the 
WebSocket
 // server code needs to create. Group all of the threads under a single
 // ThreadGroup.
 StringBuffer threadGroupName = new StringBuffer("WebSocketServer-");



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



[Bug 56923] Symlinks under WEB-INF/lib trigger a NullPointerException in StandardJarScanner

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56923

Emmanuel Bourg  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
Version|8.0.9   |8.0.12
 Resolution|INVALID |---
Summary|NullPointerException when   |Symlinks under WEB-INF/lib
   |starting tomcat8-examples   |trigger a
   |in Tomcat Web Application   |NullPointerException in
   |Manager |StandardJarScanner

--- Comment #2 from Emmanuel Bourg  ---
It looks like this issue is caused by the symlinks to /usr/share/java/jstl.jar
and /usr/share/java/standard.jar installed in the WEB-INF/lib directory of the
examples application. Replacing the links with the actual files no longer
triggers the error.

This error doesn't appear with the tomcat7-examples package which also uses
symlinks (Tomcat 7.0.55).

-- 
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



[Bug 56953] A improvement for "DataInputStream"

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56953

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #17 from Mark Thomas  ---
Review comments applied.

-- 
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



[Bug 56955] Skip some useless information in the class when parsing

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56955
Bug 56955 depends on bug 56953, which changed state.

Bug 56953 Summary: A improvement for "DataInputStream"
https://issues.apache.org/bugzilla/show_bug.cgi?id=56953

   What|Removed |Added

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

-- 
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: r1625564 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 13:00:41 2014
New Revision: 1625564

URL: http://svn.apache.org/r1625564
Log:
Review comments from kkolinko
Port of 1625563 from trunk

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1625563

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java?rev=1625564&r1=1625563&r2=1625564&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
 Wed Sep 17 13:00:41 2014
@@ -109,7 +109,7 @@ class FastDataInputStream extends Buffer
 }
 int ch1 = this.buf[pos++] & 0xff;
 int ch2 = this.buf[pos++] & 0xff;
-return (short)((ch1 << 8) + (ch2 << 0));
+return (short)((ch1 << 8) + ch2);
 }
 
 
@@ -122,7 +122,7 @@ class FastDataInputStream extends Buffer
 
 int ch1 = this.buf[pos++] & 0xff;
 int ch2 = this.buf[pos++] & 0xff;
-return (ch1 << 8) + (ch2 << 0);
+return (ch1 << 8) + ch2;
 }
 
 
@@ -134,7 +134,7 @@ class FastDataInputStream extends Buffer
 }
 int ch1 = this.buf[pos++] & 0xff;
 int ch2 = this.buf[pos++] & 0xff;
-return (char)((ch1 << 8) + (ch2 << 0));
+return (char)((ch1 << 8) + ch2);
 }
 
 
@@ -148,7 +148,7 @@ class FastDataInputStream extends Buffer
 int ch2 = this.buf[pos++] & 0xff;
 int ch3 = this.buf[pos++] & 0xff;
 int ch4 = this.buf[pos++] & 0xff;
-return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
+return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + ch4);
 }
 
 
@@ -162,7 +162,7 @@ class FastDataInputStream extends Buffer
 ((long)(readBuffer[4] & 255) << 24) +
 ((readBuffer[5] & 255) << 16) +
 ((readBuffer[6] & 255) <<  8) +
-((readBuffer[7] & 255) <<  0));
+(readBuffer[7] & 255));
 }
 
 
@@ -208,7 +208,6 @@ class FastDataInputStream extends Buffer
 while (sum < n && (cur = (int) in.skip(n - sum)) > 0) {
 sum += cur;
 }
-fillNew();
 return sum;
 }
 // Data in the buffer is not enough
@@ -220,7 +219,6 @@ class FastDataInputStream extends Buffer
 while (sum < n && (cur = (int) in.skip(n - sum)) > 0) {
 sum += cur;
 }
-fillNew();
 return sum;
 }
 pos += n;
@@ -231,6 +229,6 @@ class FastDataInputStream extends Buffer
 @Override
 public String readLine() throws IOException {
 // Unimplemented
-throw new IOException();
+throw new UnsupportedOperationException();
 }
 }
\ No newline at end of file



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



[Bug 56397] Establish parallel Maven-based build process

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397

--- Comment #11 from Pierre Viret  ---
Sorry about the circular dependency I forgot to mention that tomcat-coyote
needs tomcat-util to compile, so tomcat-util may not depend on the
tomcat-coyote.

-- 
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: r1625563 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:59:55 2014
New Revision: 1625563

URL: http://svn.apache.org/r1625563
Log:
Review comments from kkolinko

Modified:

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

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java?rev=1625563&r1=1625562&r2=1625563&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
 Wed Sep 17 12:59:55 2014
@@ -109,7 +109,7 @@ class FastDataInputStream extends Buffer
 }
 int ch1 = this.buf[pos++] & 0xff;
 int ch2 = this.buf[pos++] & 0xff;
-return (short)((ch1 << 8) + (ch2 << 0));
+return (short)((ch1 << 8) + ch2);
 }
 
 
@@ -122,7 +122,7 @@ class FastDataInputStream extends Buffer
 
 int ch1 = this.buf[pos++] & 0xff;
 int ch2 = this.buf[pos++] & 0xff;
-return (ch1 << 8) + (ch2 << 0);
+return (ch1 << 8) + ch2;
 }
 
 
@@ -134,7 +134,7 @@ class FastDataInputStream extends Buffer
 }
 int ch1 = this.buf[pos++] & 0xff;
 int ch2 = this.buf[pos++] & 0xff;
-return (char)((ch1 << 8) + (ch2 << 0));
+return (char)((ch1 << 8) + ch2);
 }
 
 
@@ -148,7 +148,7 @@ class FastDataInputStream extends Buffer
 int ch2 = this.buf[pos++] & 0xff;
 int ch3 = this.buf[pos++] & 0xff;
 int ch4 = this.buf[pos++] & 0xff;
-return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
+return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + ch4);
 }
 
 
@@ -162,7 +162,7 @@ class FastDataInputStream extends Buffer
 ((long)(readBuffer[4] & 255) << 24) +
 ((readBuffer[5] & 255) << 16) +
 ((readBuffer[6] & 255) <<  8) +
-((readBuffer[7] & 255) <<  0));
+(readBuffer[7] & 255));
 }
 
 
@@ -208,7 +208,6 @@ class FastDataInputStream extends Buffer
 while (sum < n && (cur = (int) in.skip(n - sum)) > 0) {
 sum += cur;
 }
-fillNew();
 return sum;
 }
 // Data in the buffer is not enough
@@ -220,7 +219,6 @@ class FastDataInputStream extends Buffer
 while (sum < n && (cur = (int) in.skip(n - sum)) > 0) {
 sum += cur;
 }
-fillNew();
 return sum;
 }
 pos += n;
@@ -231,6 +229,6 @@ class FastDataInputStream extends Buffer
 @Override
 public String readLine() throws IOException {
 // Unimplemented
-throw new IOException();
+throw new UnsupportedOperationException();
 }
 }
\ No newline at end of file



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



[Bug 56953] A improvement for "DataInputStream"

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56953

--- Comment #16 from Mark Thomas  ---
Patch has been applied to 7.0.x for 7.0.56 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: r1625562 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/PerMessageDeflate.java

2014-09-17 Thread violetagg
Author: violetagg
Date: Wed Sep 17 12:44:09 2014
New Revision: 1625562

URL: http://svn.apache.org/r1625562
Log:
Merged revision 1619742 from tomcat/trunk:
WebSocket permessage-deflate. Implement no_context_takeover parameters.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java?rev=1625562&r1=1625561&r2=1625562&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java 
Wed Sep 17 12:44:09 2014
@@ -55,7 +55,6 @@ public class PerMessageDeflate implement
 private volatile Transformation next;
 private volatile boolean skipDecompression = false;
 private volatile ByteBuffer writeBuffer = 
ByteBuffer.allocate(Constants.DEFAULT_BUFFER_SIZE);
-private volatile boolean deflaterResetRequired = true;
 private volatile boolean firstCompressedFrameWritten = false;
 private volatile byte[] EOM_BUFFER = new byte[EOM_BYTES.length + 1];
 
@@ -212,6 +211,9 @@ public class PerMessageDeflate implement
 }
 }
 } else if (written == 0) {
+if (fin && !serverContextTakeover) {
+inflater.reset();
+}
 return TransformationResult.END_OF_FRAME;
 }
 }
@@ -310,13 +312,6 @@ public class PerMessageDeflate implement
 SendHandler uncompressedIntermediateHandler =
 uncompressedPart.getIntermediateHandler();
 
-// Need to reset the deflater at the start of every message
-if (deflaterResetRequired) {
-deflater.reset();
-deflaterResetRequired = false;
-firstCompressedFrameWritten = false;
-}
-
 deflater.setInput(uncompressedPayload.array(),
 uncompressedPayload.arrayOffset() + 
uncompressedPayload.position(),
 uncompressedPayload.remaining());
@@ -359,8 +354,8 @@ public class PerMessageDeflate implement
 compressedPart = new MessagePart(true, 
getRsv(uncompressedPart),
 opCode, compressedPayload, 
uncompressedIntermediateHandler,
 uncompressedIntermediateHandler);
-deflaterResetRequired = true;
 deflateRequired = false;
+startNewMessage();
 } else if (full && !needsInput) {
 // Write buffer full and input message not fully read.
 // Output and start new compressed part.
@@ -389,8 +384,8 @@ public class PerMessageDeflate implement
 compressedPart = new MessagePart(true,
 getRsv(uncompressedPart), opCode, 
compressedPayload,
 uncompressedIntermediateHandler, 
uncompressedIntermediateHandler);
-deflaterResetRequired = true;
 deflateRequired = false;
+startNewMessage();
 } else {
 // More data to write
 // Copy bytes to new write buffer
@@ -426,6 +421,13 @@ public class PerMessageDeflate implement
 }
 
 
+private void startNewMessage() {
+firstCompressedFrameWritten = false;
+if (!clientContextTakeover) {
+deflater.reset();
+}
+}
+
 private int getRsv(MessagePart uncompressedMessagePart) {
 int result = uncompressedMessagePart.getRsv();
 if (!firstCompressedFrameWritten) {



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



svn commit: r1625559 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/ClassParser.java java/org/apache/tomcat/util/bcel/classfile/FastDataInp

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:43:09 2014
New Revision: 1625559

URL: http://svn.apache.org/r1625559
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56953
Further performance improvements to BCEL parser.
Based on a patch by hzhang9
POrt of r1625504 from trunk

Added:

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
  - copied unchanged from r1625504, 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1625504

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java?rev=1625559&r1=1625558&r2=1625559&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
 Wed Sep 17 12:43:09 2014
@@ -17,9 +17,7 @@
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import java.io.BufferedInputStream;
 import java.io.DataInput;
-import java.io.DataInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
@@ -59,7 +57,7 @@ public final class ClassParser {
  * @param file Input stream
  */
 public ClassParser(InputStream file) {
-this.file = new DataInputStream(new BufferedInputStream(file, 
BUFSIZE));
+this.file = new FastDataInputStream(file, BUFSIZE);
 }
 
 



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



svn commit: r1625558 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:42:29 2014
New Revision: 1625558

URL: http://svn.apache.org/r1625558
Log:
Use the DataInput interface rather than an implementation.
Port of r1625501 from trunk

Also Align 7.0.x with trunk after comparing the two

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantUtf8.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1625501

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java?rev=1625558&r1=1625557&r2=1625558&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
 Wed Sep 17 12:42:29 2014
@@ -17,7 +17,7 @@
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import java.io.DataInputStream;
+import java.io.DataInput;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -35,32 +35,26 @@ public class AnnotationEntry implements 
 private final int type_index;
 private final ConstantPool constant_pool;
 
-// FIXME: add 'final'
-private List element_value_pairs;
+private final List element_value_pairs;
 
 /**
- * Factory method to create an AnnotionEntry from a DataInputStream
+ * Creates an AnnotationEntry from a DataInputStream
  * 
  * @param file
  * @param constant_pool
- * @return the entry
  * @throws IOException
  */
-public static AnnotationEntry read(DataInputStream file, ConstantPool 
constant_pool) throws IOException {
-
-final AnnotationEntry annotationEntry = new 
AnnotationEntry(file.readUnsignedShort(), constant_pool);
-final int num_element_value_pairs = (file.readUnsignedShort());
-annotationEntry.element_value_pairs = new 
ArrayList();
-for (int i = 0; i < num_element_value_pairs; i++) {
-annotationEntry.element_value_pairs.add(new 
ElementValuePair(file.readUnsignedShort(), ElementValue.readElementValue(file, 
constant_pool),
-constant_pool));
-}
-return annotationEntry;
-}
+AnnotationEntry(DataInput file, ConstantPool constant_pool) throws 
IOException {
 
-AnnotationEntry(int type_index, ConstantPool constant_pool) {
-this.type_index = type_index;
 this.constant_pool = constant_pool;
+
+type_index = file.readUnsignedShort();
+int num_element_value_pairs = file.readUnsignedShort();
+
+element_value_pairs = new 
ArrayList(num_element_value_pairs);
+for (int i = 0; i < num_element_value_pairs; i++) {
+element_value_pairs.add(new ElementValuePair(file, constant_pool));
+}
 }
 
 /**

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java?rev=1625558&r1=1625557&r2=1625558&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
 Wed Sep 17 12:42:29 2014
@@ -17,7 +17,7 @@
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import java.io.DataInputStream;
+import java.io.DataInput;
 import java.io.IOException;
 
 /**
@@ -34,12 +34,12 @@ public class Annotations {
  * @param file Input stream
  * @param constant_pool Array of constants
  */
-Annotations(DataInputStream file, ConstantPool constant_pool)
+Annotations(DataInput file, ConstantPool constant_pool)
   

svn commit: r1625557 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/AccessFlags.java java/org/apache/tomcat/util/bcel/classfile/JavaClass.j

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:35:00 2014
New Revision: 1625557

URL: http://svn.apache.org/r1625557
Log:
Merge AccessFlags and JavaClass as the other sub-classes of
AccessFlags have been removed.
Port of r1624959 from trunk

Removed:

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AccessFlags.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624959

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java?rev=1625557&r1=1625556&r2=1625557&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java 
Wed Sep 17 12:35:00 2014
@@ -27,12 +27,13 @@ package org.apache.tomcat.util.bcel.clas
 
  * @author  mailto:m.d...@gmx.de";>M. Dahm
  */
-public class JavaClass extends AccessFlags {
+public class JavaClass {
 
-private String class_name;
-private String superclass_name;
-private String[] interface_names;
-private Annotations runtimeVisibleAnnotations; // 
"RuntimeVisibleAnnotations" attribute defined in the class
+private final int access_flags;
+private final String class_name;
+private final String superclass_name;
+private final String[] interface_names;
+private final Annotations runtimeVisibleAnnotations; // 
"RuntimeVisibleAnnotations" attribute defined in the class
 
 /**
  * Constructor gets all contents as arguments.
@@ -55,6 +56,13 @@ public class JavaClass extends AccessFla
 }
 
 /**
+ * @return Access flags of the object aka. "modifiers".
+ */
+public final int getAccessFlags() {
+return access_flags;
+}
+
+/**
  * Return annotations entries from "RuntimeVisibleAnnotations" attribute on
  * the class, if there is any.
  *



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



svn commit: r1625556 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/ClassParser.java

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:34:03 2014
New Revision: 1625556

URL: http://svn.apache.org/r1625556
Log:
Remove branch that is not used by Tomcat. Thanks to Cobertura coverage report.
Port of r1624648 from trunk

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624648

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java?rev=1625556&r1=162&r2=1625556&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
 Wed Sep 17 12:34:03 2014
@@ -58,11 +58,7 @@ public final class ClassParser {
  * @param file Input stream
  */
 public ClassParser(InputStream file) {
-if (file instanceof DataInputStream) {
-this.file = (DataInputStream) file;
-} else {
-this.file = new DataInputStream(new BufferedInputStream(file, 
BUFSIZE));
-}
+this.file = new DataInputStream(new BufferedInputStream(file, 
BUFSIZE));
 }
 
 



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



svn commit: r1625555 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/ContextConfig.java java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/ClassParser.java te

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:30:32 2014
New Revision: 162

URL: http://svn.apache.org/r162
Log:
Remove class_name argument from constructor, as Tomcat does not provide the 
name.
Port of r1624647 from trunk

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/bcel/TesterPerformance.java

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=162&r1=1625554&r2=162&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java 
Wed Sep 17 12:30:32 2014
@@ -2067,7 +2067,7 @@ public class ContextConfig implements Li
 boolean handlesTypesOnly)
 throws ClassFormatException, IOException {
 
-ClassParser parser = new ClassParser(is, null);
+ClassParser parser = new ClassParser(is);
 JavaClass clazz = parser.parse();
 checkHandlesTypes(clazz);
 
@@ -2226,7 +2226,7 @@ public class ContextConfig implements Li
 if (is == null) {
 return;
 }
-ClassParser parser = new ClassParser(is, null);
+ClassParser parser = new ClassParser(is);
 try {
 JavaClass clazz = parser.parse();
 populateJavaClassCache(clazz.getClassName(), clazz);

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624647

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java?rev=162&r1=1625554&r2=162&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
 Wed Sep 17 12:30:32 2014
@@ -43,7 +43,6 @@ public final class ClassParser {
 private static final int MAGIC = 0xCAFEBABE;
 
 private final DataInputStream file;
-private final String file_name;
 private String class_name, superclass_name;
 private int access_flags; // Access rights of parsed class
 private String[] interface_names; // Names of implemented interfaces
@@ -57,10 +56,8 @@ public final class ClassParser {
  * Parse class from the given stream.
  *
  * @param file Input stream
- * @param file_name File name
  */
-public ClassParser(InputStream file, String file_name) {
-this.file_name = file_name;
+public ClassParser(InputStream file) {
 if (file instanceof DataInputStream) {
 this.file = (DataInputStream) file;
 } else {
@@ -158,7 +155,7 @@ public final class ClassParser {
 }
 if (((access_flags & Constants.ACC_ABSTRACT) != 0)
 && ((access_flags & Constants.ACC_FINAL) != 0)) {
-throw new ClassFormatException("Class " + file_name + " can't be 
both final and abstract");
+throw new ClassFormatException("Class can't be both final and 
abstract");
 }
 
 int class_name_index = file.readUnsignedShort();
@@ -206,7 +203,7 @@ public final class ClassParser {
  */
 private void readID() throws IOException, ClassFormatException {
 if (file.readInt() != MAGIC) {
-throw new ClassFormatException(file_name + " is not a Java .class 
file");
+throw new ClassFormatException("It is not a Java .class file");
 }
 }
 

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/bcel/TesterPerformance.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/bcel/TesterPerformance.java?rev=162&r1=1625554&r2=162&view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/bcel/TesterPerformance.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/bcel/TesterPerformance.java 
Wed Sep 17 12:30:32 2014
@@ -58,7 +58,7 @@ public class TesterPerformance {
 if (jarEntryName.endsWith(".class")) {
 

svn commit: r1625554 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java java/org/apache/tomcat/util/bcel/classfile/Utility.ja

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:27:52 2014
New Revision: 1625554

URL: http://svn.apache.org/r1625554
Log:
Inline ConstantPool.getConstantString() method.
Port of r1624645 from trunk

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624645

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java?rev=1625554&r1=1625553&r2=1625554&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
 Wed Sep 17 12:27:52 2014
@@ -108,31 +108,4 @@ public class ConstantPool {
 }
 return c;
 }
-
-
-/**
- * Get string from constant pool and bypass the indirection of 
- * `ConstantClass' and `ConstantString' objects. I.e. these classes have
- * an index field that points to another entry of the constant pool of
- * type `ConstantUtf8' which contains the real data.
- *
- * @param  index Index in constant pool
- * @param  tag Tag of expected constant, either ConstantClass or 
ConstantString
- * @return Contents of string reference
- * @seeConstantClass
- * @throws  ClassFormatException
- */
-public String getConstantString( int index, byte tag ) throws 
ClassFormatException {
-Constant c = getConstant(index, tag);
-
-if (Constants.CONSTANT_Class != tag) {
-throw new RuntimeException("getConstantString called with illegal 
tag " + tag);
-}
-
-int i = ((ConstantClass) c).getNameIndex();
-
-// Finally get the string from the constant pool
-c = getConstant(i, Constants.CONSTANT_Utf8);
-return ((ConstantUtf8) c).getBytes();
-}
 }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java?rev=1625554&r1=1625553&r2=1625554&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java 
Wed Sep 17 12:27:52 2014
@@ -48,7 +48,13 @@ final class Utility {
 }
 
 static String getClassName(ConstantPool constant_pool, int index) {
-String name = constant_pool.getConstantString(index, 
Constants.CONSTANT_Class);
+Constant c = constant_pool.getConstant(index, 
Constants.CONSTANT_Class);
+int i = ((ConstantClass) c).getNameIndex();
+
+// Finally get the string from the constant pool
+c = constant_pool.getConstant(i, Constants.CONSTANT_Utf8);
+String name = ((ConstantUtf8) c).getBytes();
+
 return compactClassName(name);
 }
 



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



[Bug 56988] New: Allow to use relative paths in base.path setting when building Tomcat, e.g. "base.path=../libraries"

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56988

Bug ID: 56988
   Summary: Allow to use relative paths in base.path setting when
building Tomcat, e.g. "base.path=../libraries"
   Product: Tomcat 7
   Version: 7.0.55
  Hardware: PC
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Packaging
  Assignee: dev@tomcat.apache.org
  Reporter: knst.koli...@gmail.com

Someone has configured ASF Buildbot for Tomcat with
'echo base.path=../basepath > build.properties'

It resulted in failure at step "extras-commons-logging",
http://ci.apache.org/builders/tomcat-7-trunk/builds/296

Some log file snippets:

[[[
testexist:
 [echo] Testing  for
../basepath/avalon-framework-4.1.5/avalon-framework-4.1.5.jar

downloadfile:

]]]

[[[
extras-commons-logging:
   [gunzip] Expanding
/home/buildslave32/slave32/tomcat-7-trunk/basepath/commons-logging-1.1.3/commons-logging-1.1.3-src.tar.gz
to
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-src.tar
[untar] Expanding:
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-src.tar
into /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging
[mkdir] Created dir:
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/src/main/java/org/apache/juli
 [move] Moving 16 files to
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/src/main/java/org/apache/juli
 [copy] Copying 1 file to
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src
 [copy] Copying 4 files to
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src

init:
 [echo]  Logging Wrapper Library 1.1.3 

prepare:
 [echo] 
 [echo] Log4j12: log4j-1.2.17.jar
 [echo] 
 [echo] 
 [echo] LogKit: ../basepath/logkit-1.0.1/logkit-1.0.1.jar
 [echo] Avalon-Framework:
../basepath/avalon-framework-4.1.5/avalon-framework-4.1.5.jar
 [echo] 
[mkdir] Created dir:
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target
[mkdir] Created dir:
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target/classes
[mkdir] Created dir:
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target/conf
[mkdir] Created dir:
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target/tests

static:
 [copy] Copying 1 file to
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target/conf

discovery:

log4j12-warning:

log4j13-warning:

logkit-warning:
 [echo] 
 [echo] *** WARNING ***
 [echo] LogKit not found: Cannot Build LogKitLogger
 [echo] 

jdk1.4-warning:

avalon-framework-warning:
 [echo] 
 [echo] *** WARNING ***
 [echo] Avalon-Framework not found: Cannot Build AvalonLogger
 [echo] 

compile-non-log4j:
[javac]
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/build2.xml:362:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 11 source files to
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target/classes
[javac]
/home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/src/main/java/org/apache/juli/logging/impl/ServletContextCleaner.java:23:
package javax.servlet does not exist
[javac] import javax.servlet.ServletContextEvent;
[javac] ^
]]]

So,
1. avalon-framework-4.1.5.jar was present and has not been downloaded
2. commons-logging build script failed to detect it,
with "Avalon-Framework not found: Cannot Build AvalonLogger"

Compilation is performed by 



So dir is a different directory.


Fix

I was able to fix this issue by adding inheritAll="false" to the above 
command.

-- 
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: r1625553 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:26:53 2014
New Revision: 1625553

URL: http://svn.apache.org/r1625553
Log:
Move int -> String mapping for class and interface names from JavaClass to 
ClassParser.
This avoids an intermediary int[] array.
Move commons classname lookup and compact code into a helper method.
Port of r1624642 from trunk

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624642

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java?rev=1625553&r1=1625552&r2=1625553&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
 Wed Sep 17 12:26:53 2014
@@ -44,13 +44,14 @@ public final class ClassParser {
 
 private final DataInputStream file;
 private final String file_name;
-private int class_name_index, superclass_name_index;
+private String class_name, superclass_name;
 private int access_flags; // Access rights of parsed class
-private int[] interfaces; // Names of implemented interfaces
+private String[] interface_names; // Names of implemented interfaces
 private ConstantPool constant_pool; // collection of constants
 private Annotations runtimeVisibleAnnotations; // 
"RuntimeVisibleAnnotations" attribute defined in the class
 private static final int BUFSIZE = 8192;
 
+private static final String[] INTERFACES_EMPTY_ARRAY = new String[0];
 
 /**
  * Parse class from the given stream.
@@ -101,8 +102,8 @@ public final class ClassParser {
 readAttributes();
 
 // Return the information we have gathered in a new object
-return new JavaClass(class_name_index, superclass_name_index,
-access_flags, constant_pool, interfaces,
+return new JavaClass(class_name, superclass_name,
+access_flags, constant_pool, interface_names,
 runtimeVisibleAnnotations);
 }
 
@@ -159,8 +160,17 @@ public final class ClassParser {
 && ((access_flags & Constants.ACC_FINAL) != 0)) {
 throw new ClassFormatException("Class " + file_name + " can't be 
both final and abstract");
 }
-class_name_index = file.readUnsignedShort();
-superclass_name_index = file.readUnsignedShort();
+
+int class_name_index = file.readUnsignedShort();
+class_name = Utility.getClassName(constant_pool, class_name_index);
+
+int superclass_name_index = file.readUnsignedShort();
+if (superclass_name_index > 0) {
+// May be zero -> class is java.lang.Object
+superclass_name = Utility.getClassName(constant_pool, 
superclass_name_index);
+} else {
+superclass_name = "java.lang.Object";
+}
 }
 
 
@@ -210,10 +220,13 @@ public final class ClassParser {
 int interfaces_count;
 interfaces_count = file.readUnsignedShort();
 if (interfaces_count > 0) {
-interfaces = new int[interfaces_count];
+interface_names = new String[interfaces_count];
 for (int i = 0; i < interfaces_count; i++) {
-interfaces[i] = file.readUnsignedShort();
+int index = file.readUnsignedShort();
+interface_names[i] = Utility.getClassName(constant_pool, 
index);
 }
+} else {
+interface_names = INTERFACES_EMPTY_ARRAY;
 }
 }
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java?rev=1625553&r1=1625552&r2=1625553&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java 
Wed Sep 17 12:26:53 2014
@@ -17,8 +17,6 @@
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import org.apache.tomcat

svn commit: r1625552 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/ClassParser.java java/org/apache/tomcat/util/bcel/classfile/JavaClass.j

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:25:43 2014
New Revision: 1625552

URL: http://svn.apache.org/r1625552
Log:
Do not create an empty arrays when Class has no interfaces.
Skip creation of int[] indexes array and share the same empty String[] names 
array.
Port of r1624636 from trunk

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624636

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java?rev=1625552&r1=1625551&r2=1625552&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
 Wed Sep 17 12:25:43 2014
@@ -209,9 +209,11 @@ public final class ClassParser {
 private void readInterfaces() throws IOException, ClassFormatException {
 int interfaces_count;
 interfaces_count = file.readUnsignedShort();
-interfaces = new int[interfaces_count];
-for (int i = 0; i < interfaces_count; i++) {
-interfaces[i] = file.readUnsignedShort();
+if (interfaces_count > 0) {
+interfaces = new int[interfaces_count];
+for (int i = 0; i < interfaces_count; i++) {
+interfaces[i] = file.readUnsignedShort();
+}
 }
 }
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java?rev=1625552&r1=1625551&r2=1625552&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java 
Wed Sep 17 12:25:43 2014
@@ -36,6 +36,7 @@ public class JavaClass extends AccessFla
 private String[] interface_names;
 private Annotations runtimeVisibleAnnotations; // 
"RuntimeVisibleAnnotations" attribute defined in the class
 
+private static final String[] INTERFACES_EMPTY_ARRAY = new String[0];
 
 /**
  * Constructor gets all contents as arguments.
@@ -52,9 +53,6 @@ public class JavaClass extends AccessFla
 JavaClass(int class_name_index, int superclass_name_index,
 int access_flags, ConstantPool constant_pool, int[] interfaces,
 Annotations runtimeVisibleAnnotations) {
-if (interfaces == null) {
-interfaces = new int[0];
-}
 this.access_flags = access_flags;
 this.runtimeVisibleAnnotations = runtimeVisibleAnnotations;
 
@@ -72,10 +70,15 @@ public class JavaClass extends AccessFla
 } else {
 superclass_name = "java.lang.Object";
 }
-interface_names = new String[interfaces.length];
-for (int i = 0; i < interfaces.length; i++) {
-String str = constant_pool.getConstantString(interfaces[i], 
Constants.CONSTANT_Class);
-interface_names[i] = Utility.compactClassName(str);
+
+if (interfaces == null) {
+interface_names = INTERFACES_EMPTY_ARRAY;
+} else {
+interface_names = new String[interfaces.length];
+for (int i = 0; i < interfaces.length; i++) {
+String str = constant_pool.getConstantString(interfaces[i], 
Constants.CONSTANT_Class);
+interface_names[i] = Utility.compactClassName(str);
+}
 }
 }
 



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



svn commit: r1625551 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:24:28 2014
New Revision: 1625551

URL: http://svn.apache.org/r1625551
Log:
Get rid of ArrayList arithmetics in JavaClass.getAnnotationEntries()
Note that this changes return value of getAnnotationEntries() to be null 
instead of zero-length array by default.

This is based on the following:
- All annotation entries come from a "RuntimeVisibleAnnotations" attribute on a 
class file
- According to JVM specification, ch.4.7.16
"Each ClassFile, field_info, and method_info structure may contain at most one 
RuntimeVisibleAnnotations attribute"

Thus there is no need to create an array of attributes and enumerate all those, 
as there is either zero or one such attribute.
Port of r1624614 from trunk

Removed:

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1625551&r1=1625550&r2=1625551&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java 
Wed Sep 17 12:24:28 2014
@@ -2078,17 +2078,18 @@ public class ContextConfig implements Li
 String className = clazz.getClassName();
 
 AnnotationEntry[] annotationsEntries = clazz.getAnnotationEntries();
-
-for (AnnotationEntry ae : annotationsEntries) {
-String type = ae.getAnnotationType();
-if ("Ljavax/servlet/annotation/WebServlet;".equals(type)) {
-processAnnotationWebServlet(className, ae, fragment);
-}else if ("Ljavax/servlet/annotation/WebFilter;".equals(type)) {
-processAnnotationWebFilter(className, ae, fragment);
-}else if ("Ljavax/servlet/annotation/WebListener;".equals(type)) {
-fragment.addListener(className);
-} else {
-// Unknown annotation - ignore
+if (annotationsEntries != null) {
+for (AnnotationEntry ae : annotationsEntries) {
+String type = ae.getAnnotationType();
+if ("Ljavax/servlet/annotation/WebServlet;".equals(type)) {
+processAnnotationWebServlet(className, ae, fragment);
+}else if ("Ljavax/servlet/annotation/WebFilter;".equals(type)) 
{
+processAnnotationWebFilter(className, ae, fragment);
+}else if 
("Ljavax/servlet/annotation/WebListener;".equals(type)) {
+fragment.addListener(className);
+} else {
+// Unknown annotation - ignore
+}
 }
 }
 }
@@ -2151,24 +2152,25 @@ public class ContextConfig implements Li
 for (Map.Entry, Set> entry :
 typeInitializerMap.entrySet()) {
 if (entry.getKey().isAnnotation()) {
-AnnotationEntry[] annotationEntries =
-javaClass.getAnnotationEntries();
-for (AnnotationEntry annotationEntry : annotationEntries) {
-if (entry.getKey().getName().equals(
-
getClassName(annotationEntry.getAnnotationType( {
-if (clazz == null) {
-clazz = Introspection.loadClass(
-context, className);
+AnnotationEntry[] annotationEntries = 
javaClass.getAnnotationEntries();
+if (annotationEntries != null) {
+for (AnnotationEntry annotationEntry : 
annotationEntries) {
+if (entry.getKey().getName().equals(
+
getClassName(annotationEntry.getAnnotationType( {
 if (clazz == null) {
-// Can't load the class so no point
-// continuing
-return;
+clazz = Introspection.loadClass(
+context, className);
+   

svn commit: r1625547 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:21:05 2014
New Revision: 1625547

URL: http://svn.apache.org/r1625547
Log:
Flatten class hierarchy.  The only subtype of Annotations class is 
RuntimeVisibleAnnotations.
Port of r1624605 from trunk

Removed:

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624605

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java?rev=1625547&r1=1625546&r2=1625547&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
 Wed Sep 17 12:21:05 2014
@@ -26,7 +26,7 @@ import java.io.IOException;
  * @author  mailto:dbros...@qis.net";>D. Brosius
  * @since 6.0
  */
-public abstract class Annotations extends Attribute {
+public class Annotations extends Attribute {
 
 private final AnnotationEntry[] annotation_table;
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java?rev=1625547&r1=1625546&r2=1625547&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java 
Wed Sep 17 12:21:05 2014
@@ -65,7 +65,7 @@ public abstract class Attribute {
 
 // Call proper constructor, depending on `name'
 if (name.equals("RuntimeVisibleAnnotations")) {
-return new RuntimeVisibleAnnotations(file, constant_pool);
+return new Annotations(file, constant_pool);
 } else {
 // All other attributes are skipped
 Utility.skipFully(file, length);



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



svn commit: r1625546 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:19:45 2014
New Revision: 1625546

URL: http://svn.apache.org/r1625546
Log:
Remove RuntimeVisibleParameterAnnotations and its supporting classes.
The fields in these classes have no getters (especially 
ParameterAnnotationEntry.annotation_table).
As such, information stored in those classes was never read by Tomcat.
Port of r1624598 from trunk

Removed:

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624598

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java?rev=1625546&r1=1625545&r2=1625546&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java 
Wed Sep 17 12:19:45 2014
@@ -66,8 +66,6 @@ public abstract class Attribute {
 // Call proper constructor, depending on `name'
 if (name.equals("RuntimeVisibleAnnotations")) {
 return new RuntimeVisibleAnnotations(file, constant_pool);
-} else if (name.equals("RuntimeVisibleParameterAnnotations")) {
-return new RuntimeVisibleParameterAnnotations(file, constant_pool);
 } else {
 // All other attributes are skipped
 Utility.skipFully(file, length);



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



[Bug 56397] Establish parallel Maven-based build process

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397

--- Comment #10 from Pierre Viret  ---
Thank you very much for your feedback.

1) About the circular dependency: the pattern for the tomcat-coyote component
selects the file "org/apache/tomcat/util/net/Constants.java".
This class is referenced by
"org.apache.tomcat.util.threads.TaskThreadFactory.java" which belongs to the
tomcat-util component. Actually only one constant field is used:

This field is defined like this in the Constants class:
public static final boolean IS_SECURITY_ENABLED =
(System.getSecurityManager() != null);

I think we can get rid of the circular dependency simply by modifying the
TaskThreadFactory class: replace the two lines which use the constant:
"if (Constants.IS_SECURITY_ENABLED) {"

With following: "if (System.getSecurityManager() != null) {"
and we should get the same result.


2) About the svn externals: this would be great! I don't know this feature so I
will study the svn documentation to understand how this would work. For
instance, is it possible to "reuse" the ant patterns defined in the build.xml
for selecting the right sources for each component?


3) I have started the implementation of a new maven project: apache-tomcat
which would create the distributions (as we can download them from
http://tomcat.apache.org/download-80.cgi). I will upload the new version of the
maven project files and the patch for the build.xml in this bug as soon as I
have a working base which would show how this can be implemented.

-- 
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: r1625536 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 12:03:10 2014
New Revision: 1625536

URL: http://svn.apache.org/r1625536
Log:
Add 'final' modifiers to fields.
Remove several num_xxx fields that accompanied an xxx array.
Port of r1624592 from trunk

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Constant.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantClass.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantDouble.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantFloat.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantInteger.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantLong.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624592

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java?rev=1625536&r1=1625535&r2=1625536&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java
 Wed Sep 17 12:03:10 2014
@@ -20,7 +20,7 @@ package org.apache.tomcat.util.bcel.clas
 public class AnnotationElementValue extends ElementValue
 {
 // For annotation element values, this is the annotation
-private AnnotationEntry annotationEntry;
+private final AnnotationEntry annotationEntry;
 
 AnnotationElementValue(int type, AnnotationEntry annotationEntry,
 ConstantPool cpool)

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java?rev=1625536&r1=1625535&r2=1625536&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
 Wed Sep 17 12:03:10 2014
@@ -35,6 +35,7 @@ public class AnnotationEntry implements 
 private final int type_index;
 private final ConstantPool constant_pool;
 
+// FIXME: add 'final'
 private List element_value_pairs;
 
 /**

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java?rev=1625536&r1=1625535&r2=1625536&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java
 Wed Sep 17 12:03:10 2014
@@ -20,7 +20,7 @@ package org.apache.tomcat.util.bcel.clas
 public class ArrayElementValue extends ElementValue
 {
 // For array types, this is the array
-private ElementValue[] evalues;
+private final ElementValue[] evalues;
 
 ArrayElementValue(int type, ElementValue[] datums, ConstantPool cpool)
 {

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.jav

Re: buildbot failure in ASF Buildbot on tomcat-7-trunk

2014-09-17 Thread Konstantin Kolinko
2014-09-17 14:42 GMT+04:00  :
> The Buildbot has detected a new failure on builder tomcat-7-trunk while 
> building ASF Buildbot.
> Full details are available at:
>  http://ci.apache.org/builders/tomcat-7-trunk/builds/296
>
> Buildbot URL: http://ci.apache.org/
>
> Buildslave for this Build: silvanus_ubuntu
>

Several notes

1. Tomcat 7 builds have been moved to a different slave, "silvanus_ubuntu"

2. I tested that I have commit right for buildbot configuration and
was able to fix misconfiguration of Ant.

The symptoms were that "ant release" command silently failed with exit
code 1 and no output.

I think the cause was that Buildbot configuration for Tomcat 7 used
tildes in the values of variables, e.g. "ANT_HOME=~/tools/ant/current"
and "JAVA_HOME=~/tools/java/latest1.6".
Replacing "~/" with "${HOME}/" helped.

My guess is tilde expansion is a feature of shell and is not supported
in the value of java CLASSPATH. So when Ant built classpath from those
values Java was not able to load those libraries. Though I wonder why
it failed with no error output.

> Build Reason: scheduler
> Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1625506
> Blamelist: violetagg
>
> BUILD FAILED: failed compile

3.  Compiling of Tomcat code succeeded.
It fails at "extras-commons-logging" compiling step.

My guess is that using a relative path as "base.path=../basepath" is
no good for extras.
E.g. Avalon was downloaded, but then it failed to find it:
[[[
 [echo] *** WARNING ***
 [echo] Avalon-Framework not found: Cannot Build AvalonLogger
]]]

At the same time, Tomcat's own code did build successfully.

So either there is a way to fix extras to build with such paths, or
one needs to update Buildbot configuration to use an absolute path for
"base.path".

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: r1625516 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 11:15:23 2014
New Revision: 1625516

URL: http://svn.apache.org/r1625516
Log:
Remove constant_pool_count field.
The field is never read, and its value is known from the length of 
constant_pool array created in constructor.
Backport of r1624588 from trunk

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624588

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java?rev=1625516&r1=1625515&r2=1625516&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
 Wed Sep 17 11:15:23 2014
@@ -35,8 +35,7 @@ import org.apache.tomcat.util.bcel.Const
  */
 public class ConstantPool {
 
-private int constant_pool_count;
-private Constant[] constant_pool;
+private final Constant[] constant_pool;
 
 
 /**
@@ -47,7 +46,7 @@ public class ConstantPool {
  * @throws ClassFormatException
  */
 ConstantPool(DataInputStream file) throws IOException, 
ClassFormatException {
-constant_pool_count = file.readUnsignedShort();
+int constant_pool_count = file.readUnsignedShort();
 constant_pool = new Constant[constant_pool_count];
 /* constant_pool[0] is unused by the compiler and may be used freely
  * by the implementation.



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



svn commit: r1625515 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/Constants.java java/org/apache/tomcat/util/bcel/classfile/Attribute.java

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 11:14:39 2014
New Revision: 1625515

URL: http://svn.apache.org/r1625515
Log:
Simplify.
There is no real need to convert every attribute name into numeric tag via 
lookup table, when there are only two attribute names that we recognize.

In the old code there was an average of (ATTRIBUTE_NAMES.length/2) = 11 
String.equals() calls when looking up a numeric 'tag'.
In the new code there will be two String.equals() calls.

This is a backport of r1624586 from trunk

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/Constants.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java

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

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
--
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624586

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/Constants.java?rev=1625515&r1=1625514&r2=1625515&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/Constants.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/Constants.java Wed 
Sep 17 11:14:39 2014
@@ -90,26 +90,4 @@ public interface Constants {
 "CONSTANT_Methodref", "CONSTANT_InterfaceMethodref",
 "CONSTANT_NameAndType", "", "", "CONSTANT_MethodHandle",
 "CONSTANT_MethodType", "", "CONSTANT_InvokeDynamic" };
-  
-
-  /** Attributes and their corresponding names.
-   */
-  public static final byte ATTR_UNKNOWN = -1;
-  public static final byte ATTR_RUNTIME_VISIBLE_ANNOTATIONS = 12;
-  public static final byte ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS   = 14;
-  public static final byte ATTR_ANNOTATION_DEFAULT  = 16;
-
-  public static final short KNOWN_ATTRIBUTES = 22;
-
-  // TOFO: FIX
-  public static final String[] ATTRIBUTE_NAMES = {
-"SourceFile", "ConstantValue", "Code", "Exceptions",
-"LineNumberTable", "LocalVariableTable",
-"InnerClasses", "Synthetic", "Deprecated",
-"PMGClass", "Signature", "StackMap", 
-"RuntimeVisibleAnnotations", "RuntimeInvisibleAnnotations",
-"RuntimeVisibleParameterAnnotations", 
"RuntimeInvisibleParameterAnnotations",
-"AnnotationDefault", "LocalVariableTypeTable", "EnclosingMethod", 
"StackMapTable",
-"BootstrapMethods", "MethodParameters"
-  };
 }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java?rev=1625515&r1=1625514&r2=1625515&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java 
Wed Sep 17 11:14:39 2014
@@ -55,7 +55,6 @@ public abstract class Attribute {
 String name;
 int name_index;
 int length;
-byte tag = Constants.ATTR_UNKNOWN; // Unknown attribute
 // Get class name from constant pool via `name_index' indirection
 name_index = file.readUnsignedShort();
 c = (ConstantUtf8) constant_pool.getConstant(name_index,
@@ -63,24 +62,14 @@ public abstract class Attribute {
 name = c.getBytes();
 // Length of data in bytes
 length = file.readInt();
-// Compare strings to find known attribute
-// System.out.println(name);
-for (byte i = 0; i < Constants.KNOWN_ATTRIBUTES; i++)
-{
-if (name.equals(Constants.ATTRIBUTE_NAMES[i]))
-{
-tag = i; // found!
-break;
-}
-}
-// Call proper constructor, depending on `tag'
-switch (tag)
-{
-case Constants.ATTR_RUNTIME_VISIBLE_ANNOTATIONS:
+
+// Call proper constructor, depending on `name'
+if (name.equals("RuntimeVisibleAnnotations")) {
 return new RuntimeVisibleAnnotations(file, constant_pool);
-case Constants.ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS:
+} else if (name.equals("RuntimeVisibleParameterAnnotations")) {
 return new RuntimeVisibleParameterAnnotations(file, constant_pool);
-default: // All other attributes are skipped
+} else {
+// All other attributes are skipped
 Utility.skipFully(file, length);
 return null;
   

[Bug 56953] A improvement for "DataInputStream"

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56953

--- Comment #15 from Konstantin Kolinko  ---
OK, this is better.

1. Formatting: the code shall not use tab characters

2. In "skipBytes(int n)":  there is no reason to call "fillNew()" after calling
"in.skip(n - sum)" on the underlying stream. If another skip call follows then
there is no point in filling the buffer.

3. "<< 0" shift operation is NOOP and can be removed.

4. I wonder whether "ch + ch" or "ch | ch" works better. In theory the latter
should be faster, but I guess there is no measurable difference nowadays.

5. In uninmplemented readLine() method: maybe better throw new
java.lang.UnsupportedOperationException() instead of IOException.

-- 
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



[Bug 56397] Establish parallel Maven-based build process

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397

--- Comment #9 from Mark Thomas  ---
Thanks for this. I still want to try and create the svn externals as that means
the Maven build would be based directly on svn and folks would be able to
commit / propose patches / merge updates much more easily.

I intended to start on this on Monday but got somewhat side-tracked with other
things.

One issue I did not want to forget. The patch mentions a circular dependency.
That is bad and I thought we had got rid of all of those. I know I could work
out the details for myself but if you have them handy it would be very helpful
if you could add them here.

-- 
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



buildbot failure in ASF Buildbot on tomcat-7-trunk

2014-09-17 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/296

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1625506
Blamelist: violetagg

BUILD FAILED: failed compile

sincerely,
 -The Buildbot




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



svn commit: r1625506 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/MessagePart.java java/org/apache/tomcat/websocket/PerMessageDeflate.java java/org/apache/tomcat/websocket/WsRemoteE

2014-09-17 Thread violetagg
Author: violetagg
Date: Wed Sep 17 10:37:10 2014
New Revision: 1625506

URL: http://svn.apache.org/r1625506
Log:
Merged revision 1619738 from tomcat/trunk:
Extend support for the WebSocket permessage-deflate extension to compression of 
outgoing messages on the server side.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/MessagePart.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/MessagePart.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/MessagePart.java?rev=1625506&r1=1625505&r2=1625506&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/MessagePart.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/MessagePart.java Wed 
Sep 17 10:37:10 2014
@@ -25,15 +25,17 @@ class MessagePart {
 private final int rsv;
 private final byte opCode;
 private final ByteBuffer payload;
-private final SendHandler handler;
+private final SendHandler intermediateHandler;
+private volatile SendHandler endHandler;
 
 public MessagePart( boolean fin, int rsv, byte opCode, ByteBuffer payload,
-SendHandler handler) {
+SendHandler intermediateHandler, SendHandler endHandler) {
 this.fin = fin;
 this.rsv = rsv;
 this.opCode = opCode;
 this.payload = payload;
-this.handler = handler;
+this.intermediateHandler = intermediateHandler;
+this.endHandler = endHandler;
 }
 
 
@@ -57,8 +59,17 @@ class MessagePart {
 }
 
 
-public SendHandler getHandler() {
-return handler;
+public SendHandler getIntermediateHandler() {
+return intermediateHandler;
+}
+
+
+public SendHandler getEndHandler() {
+return endHandler;
+}
+
+public void setEndHandler(SendHandler endHandler) {
+this.endHandler = endHandler;
 }
 }
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java?rev=1625506&r1=1625505&r2=1625506&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/PerMessageDeflate.java 
Wed Sep 17 10:37:10 2014
@@ -21,10 +21,12 @@ import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.zip.DataFormatException;
+import java.util.zip.Deflater;
 import java.util.zip.Inflater;
 
 import javax.websocket.Extension;
 import javax.websocket.Extension.Parameter;
+import javax.websocket.SendHandler;
 
 import org.apache.tomcat.util.res.StringManager;
 
@@ -47,10 +49,15 @@ public class PerMessageDeflate implement
 private final boolean clientContextTakeover;
 private final int clientMaxWindowBits;
 private final Inflater inflater = new Inflater(true);
-private final ByteBuffer readBuffer = ByteBuffer.allocate(8192);
+private final ByteBuffer readBuffer = 
ByteBuffer.allocate(Constants.DEFAULT_BUFFER_SIZE);
+private final Deflater deflater = new 
Deflater(Deflater.DEFAULT_COMPRESSION, true);
 
 private volatile Transformation next;
 private volatile boolean skipDecompression = false;
+private volatile ByteBuffer writeBuffer = 
ByteBuffer.allocate(Constants.DEFAULT_BUFFER_SIZE);
+private volatile boolean deflaterResetRequired = true;
+private volatile boolean firstCompressedFrameWritten = false;
+private volatile byte[] EOM_BUFFER = new byte[EOM_BYTES.length + 1];
 
 static PerMessageDeflate negotiate(List> preferences) {
 // Accept the first preference that the server is able to support
@@ -288,25 +295,143 @@ public class PerMessageDeflate implement
 
 
 @Override
-public List sendMessagePart(List messageParts) {
-List compressedParts = new 
ArrayList(messageParts.size());
+public List sendMessagePart(List 
uncompressedParts) {
+List allCompressedParts = new ArrayList();
 
-for (MessagePart messagePart : messageParts) {
-byte opCode = messagePart.getOpCode();
+for (MessagePart uncompressedPart : uncompressedParts) {
+byte opCode = uncompressedPart.getOpCode();
 if (Util.isControl(opCode)) {
 // Control messages can appear in the middle of other messages
  

[Bug 56953] A improvement for "DataInputStream"

2014-09-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56953

--- Comment #14 from Mark Thomas  ---
Thanks for the updated patches. I see a 20-25% improvement with the patch so it
has been applied to 8.0.x for 8.0.13 onwards.

I'll look into porting it to 7.0.x.

-- 
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: r1625504 - in /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile: ClassParser.java FastDataInputStream.java

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 10:34:51 2014
New Revision: 1625504

URL: http://svn.apache.org/r1625504
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56953
Further performance improvements to BCEL parser.
Based on a patch by hzhang9

Added:

tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
   (with props)
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=1625504&r1=1625503&r2=1625504&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 
Wed Sep 17 10:34:51 2014
@@ -17,9 +17,7 @@
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import java.io.BufferedInputStream;
 import java.io.DataInput;
-import java.io.DataInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
@@ -59,7 +57,7 @@ public final class ClassParser {
  * @param file Input stream
  */
 public ClassParser(InputStream file) {
-this.file = new DataInputStream(new BufferedInputStream(file, 
BUFSIZE));
+this.file = new FastDataInputStream(file, BUFSIZE);
 }
 
 

Added: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java?rev=1625504&view=auto
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
 (added)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FastDataInputStream.java
 Wed Sep 17 10:34:51 2014
@@ -0,0 +1,236 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tomcat.util.bcel.classfile;
+
+import java.io.BufferedInputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * A "FastDataInputStream" that get the numbers from buffer and from the target
+ * directly instead of "DataInputStream".
+ */
+class FastDataInputStream extends BufferedInputStream implements DataInput {
+
+private final byte readBuffer[] = new byte[8];
+
+
+public FastDataInputStream(InputStream in, int size) {
+super(in, size);
+}
+
+
+@Override
+public final int read(byte b[]) throws IOException {
+return this.read(b, 0, b.length);
+}
+
+
+@Override
+public final void readFully(byte b[]) throws IOException {
+readFully(b, 0, b.length);
+}
+
+
+@Override
+public final void readFully(byte b[], int off, int len) throws IOException 
{
+if (len < 0)
+throw new IndexOutOfBoundsException();
+// Total read
+int sum = 0;
+// Current read
+int cur = 0;
+for(; sum < len; sum += cur){
+cur = read(b, off + sum, len - sum);
+if(cur < 0)
+throw new EOFException();
+sum += cur;
+}
+}
+
+
+@Override
+public boolean readBoolean() throws IOException {
+if (pos >= count) {
+fillNew();
+if (pos >= count)
+throw new EOFException();
+}
+int ch = this.buf[pos++] & 0xff;
+return (ch != 0);
+}
+
+
+@Override
+public final byte readByte() throws IOException {
+if (pos >= count) {
+fillNew();
+if (pos >= count)
+throw new EOFException();
+}
+return this.buf[pos++];
+}
+
+
+@Override
+public int readUnsignedByte() throws IOException {
+if (pos >= count) {
+fillNew();
+if (pos >= count)
+throw new EOFException();
+}
+int ch = this.buf[pos++] & 0xff;
+return ch;
+}
+
+
+@Override
+public 

svn commit: r1625501 - in /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile: AnnotationEntry.java Annotations.java ClassParser.java Constant.java ConstantPool.java ConstantUtf8.java ElementValu

2014-09-17 Thread markt
Author: markt
Date: Wed Sep 17 10:28:19 2014
New Revision: 1625501

URL: http://svn.apache.org/r1625501
Log:
Use the DataInput interface rather than an implementation

Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
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/Constant.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantUtf8.java
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java

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

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java?rev=1625501&r1=1625500&r2=1625501&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java 
Wed Sep 17 10:28:19 2014
@@ -17,7 +17,7 @@
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import java.io.DataInputStream;
+import java.io.DataInput;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -44,7 +44,7 @@ public class AnnotationEntry implements 
  * @param constant_pool
  * @throws IOException
  */
-AnnotationEntry(DataInputStream file, ConstantPool constant_pool) throws 
IOException {
+AnnotationEntry(DataInput file, ConstantPool constant_pool) throws 
IOException {
 
 this.constant_pool = constant_pool;
 

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=1625501&r1=1625500&r2=1625501&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 
Wed Sep 17 10:28:19 2014
@@ -17,7 +17,7 @@
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import java.io.DataInputStream;
+import java.io.DataInput;
 import java.io.IOException;
 
 /**
@@ -34,7 +34,7 @@ public class Annotations {
  * @param file Input stream
  * @param constant_pool Array of constants
  */
-Annotations(DataInputStream file, ConstantPool constant_pool)
+Annotations(DataInput file, ConstantPool constant_pool)
 throws IOException {
 final int annotation_table_length = (file.readUnsignedShort());
 annotation_table = new AnnotationEntry[annotation_table_length];

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=1625501&r1=1625500&r2=1625501&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 
Wed Sep 17 10:28:19 2014
@@ -18,6 +18,7 @@
 package org.apache.tomcat.util.bcel.classfile;
 
 import java.io.BufferedInputStream;
+import java.io.DataInput;
 import java.io.DataInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -42,7 +43,7 @@ public final class ClassParser {
 
 private static final int MAGIC = 0xCAFEBABE;
 
-private final DataInputStream file;
+private final DataInput file;
 private String class_name, superclass_name;
 private int access_flags; // Access rights of parsed class
 private String[] interface_names; // Names of implemented interfaces

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=1625501&r1=1625500&r2=1625501&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 Wed 
Sep 17 10:28:19 2014
@@ -17,7 +17,7 @@
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import java.io.DataInputStream;
+import java.io.DataInput;
 import java.io.IOException;
 
 import org.apache.tomcat.util.bcel.Constants;
@@ -62,7 +62,7 @@ public abstract class Constant {
  * @param file Input stream
  * @return Constant object
  */
-static Constant readConstant( DataInputStrea

Re: JMX loose ends

2014-09-17 Thread Mark Thomas
On 17/09/2014 02:05, Alarcón Vladimir wrote:
> Hi, this is my first email here.
> 
> I was looking at the JMX MBeans through j-console and I found some
> loose ends here and there. It's not much, but I think I can help
> fixing them.
> 
> First, things first: Are you interested on help with the bug fixes?

Always. :)

> Second: if you are interested, how should I proceed? I got Tomcat's
> source code today and I'm browsing all around the place now :)

Open a Bugzilla issue and attach a patch in diff -u format against trunk:
http://svn.apache.org/repos/asf/tomcat/trunk/

Alternatively, you can use github and submit a pull request:
https://github.com/apache/tomcat

Mark

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



  1   2   >