[Bug 63740] Host-specific xml files are not processed when xmlBase is not null

2019-09-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63740

--- Comment #1 from uk...@atlas.cz ---
Created attachment 36771
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36771=edit
additional fix (RewriteValve)

Somehow I missed one callsite of Container.getConfigPath(): it is also used in
RewriteValve. The proposed fix is the same: use getResource() instead of
getConfResource(). Added patch #2.

-- 
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 63251] [JDK-8194653] Deadlock in FileSystems.getDefault on catalina startup

2019-09-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63251

harri...@gmail.com changed:

   What|Removed |Added

 CC||harri...@gmail.com

-- 
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 63251] [JDK-8194653] Deadlock in FileSystems.getDefault on catalina startup

2019-09-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63251

harri...@gmail.com changed:

   What|Removed |Added

Version|9.0.14  |9.0.22

--- Comment #2 from harri...@gmail.com ---
The work-around of pre-loading the default FileSystem does not appear to solve
the problem for logging, or maybe it only reduced the frequency of the
occurrence.  I am still seeing the following stacktrace from a Spring Boot
Microservice running Tomcat 9.0.22 with JDK 1.8.0_222 64-bit on RedHat 7.5:

2019-09-07 15:39:26
Full thread dump OpenJDK 64-Bit Server VM (25.222-b10 mixed mode):

"background-preinit" #9 prio=5 os_prio=0 tid=0x02d11800 nid=0x726
waiting for monitor entry [0x7f26ddd01000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at java.lang.Runtime.loadLibrary0(Runtime.java:862)
- waiting to lock <0xc010be00> (a java.lang.Runtime)
at java.lang.System.loadLibrary(System.java:1122)
at sun.nio.fs.UnixNativeDispatcher$1.run(UnixNativeDispatcher.java:573)
at sun.nio.fs.UnixNativeDispatcher$1.run(UnixNativeDispatcher.java:571)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.nio.fs.UnixNativeDispatcher.(UnixNativeDispatcher.java:571)
at sun.nio.fs.UnixFileSystem.(UnixFileSystem.java:67)
at sun.nio.fs.LinuxFileSystem.(LinuxFileSystem.java:39)
at
sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:46)
at
sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:39)
at
sun.nio.fs.UnixFileSystemProvider.(UnixFileSystemProvider.java:56)
at
sun.nio.fs.LinuxFileSystemProvider.(LinuxFileSystemProvider.java:41)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at
sun.nio.fs.DefaultFileSystemProvider.createProvider(DefaultFileSystemProvider.java:48)
at
sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.java:63)
at
java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:108)
at
java.nio.file.FileSystems$DefaultFileSystemHolder.access$000(FileSystems.java:89)
at
java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:98)
at
java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:96)
at java.security.AccessController.doPrivileged(Native Method)
at
java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem(FileSystems.java:96)
at
java.nio.file.FileSystems$DefaultFileSystemHolder.(FileSystems.java:90)
at java.nio.file.FileSystems.getDefault(FileSystems.java:176)
at org.apache.juli.logging.LogFactory.(LogFactory.java:85)
at org.apache.juli.logging.LogFactory.(LogFactory.java:66)
at
org.apache.catalina.mbeans.MBeanFactory.(MBeanFactory.java:59)
at
org.springframework.boot.autoconfigure.BackgroundPreinitializer$MBeanFactoryInitializer.run(BackgroundPreinitializer.java:139)
at
org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.runSafely(BackgroundPreinitializer.java:102)
at
org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.run(BackgroundPreinitializer.java:94)
at java.lang.Thread.run(Thread.java:748)

"main" #1 prio=5 os_prio=0 tid=0x00b52000 nid=0x687 in Object.wait()
[0x7f26fee02000]
   java.lang.Thread.State: RUNNABLE
at java.nio.file.FileSystems.getDefault(FileSystems.java:176)
at java.nio.file.Paths.get(Paths.java:138)
at sun.misc.Launcher$ExtClassLoader.findLibrary(Launcher.java:235)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1830)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
- locked <0xc010be00> (a java.lang.Runtime)
at java.lang.System.loadLibrary(System.java:1122)
at sun.security.ec.SunEC$1.run(SunEC.java:60)
at sun.security.ec.SunEC$1.run(SunEC.java:58)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ec.SunEC.(SunEC.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at 

[GitHub] [tomcat] xiantang commented on issue #194: fix typo

2019-09-09 Thread GitBox
xiantang commented on issue #194: fix typo
URL: https://github.com/apache/tomcat/pull/194#issuecomment-529468320
 
 
   @KangZhiDong too much commits


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



buildbot success in on tomcat-7-trunk

2019-09-09 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-7-trunk/builds/1445

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' 
triggered this build
Build Source Stamp: [branch 7.0.x] fa34afd8bb57ce73fd7cb4c1ae2b0379cb0bc001
Blamelist: Mark Thomas 

Build succeeded!

Sincerely,
 -The Buildbot




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



[tomcat] branch 7.0.x updated (2efd3a6 -> fa34afd)

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 2efd3a6  Fix Javadoc issues preventing release builds with newer Java 
versions
 new 78803c5  Align with 8.5.x
 new fa34afd  Simplify / align(ish) with 8.5.x.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../coyote/http11/filters/ChunkedOutputFilter.java | 29 +++---
 1 file changed, 4 insertions(+), 25 deletions(-)


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



[tomcat] 02/02: Simplify / align(ish) with 8.5.x.

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit fa34afd8bb57ce73fd7cb4c1ae2b0379cb0bc001
Author: Mark Thomas 
AuthorDate: Mon Sep 9 13:00:02 2019 +0100

Simplify / align(ish) with 8.5.x.
---
 java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java 
b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
index d6ef494..9d5f8ae 100644
--- a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
+++ b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
@@ -105,14 +105,14 @@ public class ChunkedOutputFilter implements OutputFilter {
 }
 
 // Calculate chunk header
-int pos = 7;
+int pos = 8;
 int current = result;
 while (current > 0) {
 int digit = current % 16;
 current = current / 16;
-chunkLength[pos--] = HexUtils.getHex(digit);
+chunkLength[--pos] = HexUtils.getHex(digit);
 }
-chunkHeader.setBytes(chunkLength, pos + 1, 9 - pos);
+chunkHeader.setBytes(chunkLength, pos, 10 - pos);
 buffer.doWrite(chunkHeader, res);
 
 buffer.doWrite(chunk, res);


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



[tomcat] 01/02: Align with 8.5.x

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 78803c53f4ffa4eebe68faa4bf0d283145ff94f7
Author: Mark Thomas 
AuthorDate: Mon Sep 9 12:55:46 2019 +0100

Align with 8.5.x
---
 .../coyote/http11/filters/ChunkedOutputFilter.java | 23 +-
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java 
b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
index 6e2c7f9..d6ef494 100644
--- a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
+++ b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 package org.apache.coyote.http11.filters;
 
 import java.io.IOException;
@@ -122,7 +121,6 @@ public class ChunkedOutputFilter implements OutputFilter {
 buffer.doWrite(chunkHeader, res);
 
 return result;
-
 }
 
 
@@ -134,46 +132,27 @@ public class ChunkedOutputFilter implements OutputFilter {
 
 // --- OutputFilter Methods
 
-
-/**
- * Some filters need additional parameters from the response. All the
- * necessary reading can occur in that method, as this method is called
- * after the response header processing is complete.
- */
 @Override
 public void setResponse(Response response) {
 // NOOP: No need for parameters from response in this filter
 }
 
 
-/**
- * Set the next buffer in the filter pipeline.
- */
 @Override
 public void setBuffer(OutputBuffer buffer) {
 this.buffer = buffer;
 }
 
 
-/**
- * End the current request. It is acceptable to write extra bytes using
- * buffer.doWrite during the execution of this method.
- */
 @Override
-public long end()
-throws IOException {
-
+public long end() throws IOException {
 // Write end chunk
 buffer.doWrite(END_CHUNK, null);
 
 return 0;
-
 }
 
 
-/**
- * Make the filter ready to process the next request.
- */
 @Override
 public void recycle() {
 // NOOP: Nothing to recycle


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



[tomcat] branch 8.5.x updated: Deprecated method needs same simplification.

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 13dff65  Deprecated method needs same simplification.
13dff65 is described below

commit 13dff659f1bd2cd7afa2a1013f097f66fd575aa6
Author: Mark Thomas 
AuthorDate: Mon Sep 9 12:54:28 2019 +0100

Deprecated method needs same simplification.
---
 java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java 
b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
index 7da9ea8..4cd7f7a 100644
--- a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
+++ b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 package org.apache.coyote.http11.filters;
 
 import java.io.IOException;
@@ -93,7 +92,7 @@ public class ChunkedOutputFilter implements OutputFilter {
 
 int pos = calculateChunkHeader(result);
 
-chunkHeader.position(pos + 1).limit(chunkHeader.position() + 9 - pos);
+chunkHeader.position(pos).limit(10);
 buffer.doWrite(chunkHeader);
 
 buffer.doWrite(chunk);
@@ -102,7 +101,6 @@ public class ChunkedOutputFilter implements OutputFilter {
 buffer.doWrite(chunkHeader);
 
 return result;
-
 }
 
 
@@ -126,7 +124,6 @@ public class ChunkedOutputFilter implements OutputFilter {
 buffer.doWrite(chunkHeader);
 
 return result;
-
 }
 
 


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



[Bug 63740] New: Host-specific xml files are not processed when xmlBase is not null

2019-09-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63740

Bug ID: 63740
   Summary: Host-specific xml files are not processed when xmlBase
is not null
   Product: Tomcat 9
   Version: 9.0.24
  Hardware: PC
OS: All
Status: NEW
  Keywords: PatchAvailable
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: uk...@atlas.cz
  Target Milestone: -

Created attachment 36769
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36769=edit
proposed fix

This is a Tomcat 9 - specific bug. Tested with Tomcat 9.0.24. Tomcat 8.5.43
works correctly. Earlier versions not tested.

When using a Host with xmlBase attribute the Host-specific context.xml.default
and web.xml.default files are not processed at all (because they are not
found).

Debugging the problem reveals that Tomcat searches for them in the wrong place:
always in ${catalina.base}/conf/${xmlBase} instead of ${xmlBase} (when xmlBase
is absolute) or ${catalina.base}/${xmlBase} (when xmlBase is relative).

Examples:
for xmlBase="conf/cx" tomcat searches in "${catalina.base}/conf/conf/cx"
but should search in "${catalina.base}/conf/cx"

for xmlBase="H:/myhost" tomcat searches in "${catalina.base}/conf/H:/myhost"
but should search in "H:/myhost"

Workarounds: using symlinks (a nuisance at best) or using Tomcat 8.5.

Analysis: the documentation says that when xmlBase is not specified then
"conf//" will be used as default. However,
Container.getConfigPath() does not prepend "conf/" when xmlBase is null,
and to compensate for this error the (only) 2 callers use
ConfigFileLoader.getSource().getConfResource()
instead of the correct
ConfigFileLoader.getSource().getResource()
This becomes a problem when xmlBase is not null: getConfResouce() prepends
"conf/".

Proposed fix (see attached patch):
- Container.getConfigPath(): prepend "conf/" when xmlBase is null
- ContextConfig.contextConfig() and ContextConfig.getWebXmlSource():
call ConfigFileLoader.getSource().getResource() when working with the result of
Container.getConfigPath()

Proposed fix tested successfully in 3 scenarios:
- no xmlBase: OK
- relative xmlBase: OK
- absolute xmlBase: OK

How to easily test that the fix works:
- for context.xml.default: the log contains (example)
  "Successfully processed context [/my-ws] configuration file
[file:/H:/myhost/context.xml.default]"
- for web.xml.default: declare a filter in it with a (unique) nonexistent
className and expect to see a "ClassNotFoundException" with that className

Thanks for fixing 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



[tomcat] 02/02: Simplify

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 096bb8d5347611099ba3a68f133a8e82b37dd28c
Author: Mark Thomas 
AuthorDate: Mon Sep 9 11:40:09 2019 +0100

Simplify

In calculateChunkHeader() start pos at 8 rather than 7 and then
decrement before it is used rather than after. This results in the same
number of decrement calls and the same values used in chunkHeader.put()
but the returned value is 1 higher than previously, removing the need
for the +1 in the caller.
---
 java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java 
b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
index 063f462..7da9ea8 100644
--- a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
+++ b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
@@ -117,7 +117,7 @@ public class ChunkedOutputFilter implements OutputFilter {
 
 int pos = calculateChunkHeader(result);
 
-chunkHeader.position(pos + 1).limit(10);
+chunkHeader.position(pos).limit(10);
 buffer.doWrite(chunkHeader);
 
 buffer.doWrite(chunk);
@@ -132,12 +132,12 @@ public class ChunkedOutputFilter implements OutputFilter {
 
 private int calculateChunkHeader(int len) {
 // Calculate chunk header
-int pos = 7;
+int pos = 8;
 int current = len;
 while (current > 0) {
 int digit = current % 16;
 current = current / 16;
-chunkHeader.put(pos--, HexUtils.getHex(digit));
+chunkHeader.put(--pos, HexUtils.getHex(digit));
 }
 return pos;
 }


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



[tomcat] branch 8.5.x updated (5153065 -> 096bb8d)

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 5153065  Align with 9.0.x. Javadoc and spacing.
 new f42e1bb  Simplify
 new 096bb8d  Simplify

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


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



[tomcat] 01/02: Simplify

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit f42e1bb5f4212d380e629ae117317f47c4927556
Author: Mark Thomas 
AuthorDate: Mon Sep 9 11:35:52 2019 +0100

Simplify

position is set to:
pos + 1

Then limit is set to
position + 9 - pos = pos + 1 + 9 - pos
   = 1 + 9
   = 10
---
 java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java 
b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
index 3560c8a..063f462 100644
--- a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
+++ b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
@@ -117,7 +117,7 @@ public class ChunkedOutputFilter implements OutputFilter {
 
 int pos = calculateChunkHeader(result);
 
-chunkHeader.position(pos + 1).limit(chunkHeader.position() + 9 - pos);
+chunkHeader.position(pos + 1).limit(10);
 buffer.doWrite(chunkHeader);
 
 buffer.doWrite(chunk);


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



[tomcat] branch master updated (1a7944f -> 965792e)

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 1a7944f  Polish. Spacing.
 new 0266539  Simplify
 new 965792e  Simplify

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


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



[tomcat] 01/02: Simplify

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 0266539eac4cc598971f3488b38fb0fa52bd2a46
Author: Mark Thomas 
AuthorDate: Mon Sep 9 11:35:52 2019 +0100

Simplify

position is set to:
pos + 1

Then limit is set to
position + 9 - pos = pos + 1 + 9 - pos
   = 1 + 9
   = 10
---
 java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java 
b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
index 65bcf39..b382683 100644
--- a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
+++ b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
@@ -106,7 +106,7 @@ public class ChunkedOutputFilter implements OutputFilter {
 
 int pos = calculateChunkHeader(result);
 
-chunkHeader.position(pos + 1).limit(chunkHeader.position() + 9 - pos);
+chunkHeader.position(pos + 1).limit(10);
 buffer.doWrite(chunkHeader);
 
 buffer.doWrite(chunk);


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



[tomcat] 02/02: Simplify

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 965792e2bf9126165f7a402c105e7fd669bd60f6
Author: Mark Thomas 
AuthorDate: Mon Sep 9 11:40:09 2019 +0100

Simplify

In calculateChunkHeader() start pos at 8 rather than 7 and then
decrement before it is used rather than after. This results in the same
number of decrement calls and the same values used in chunkHeader.put()
but the returned value is 1 higher than previously, removing the need
for the +1 in the caller.
---
 java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java 
b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
index b382683..6eedd81 100644
--- a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
+++ b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
@@ -106,7 +106,7 @@ public class ChunkedOutputFilter implements OutputFilter {
 
 int pos = calculateChunkHeader(result);
 
-chunkHeader.position(pos + 1).limit(10);
+chunkHeader.position(pos).limit(10);
 buffer.doWrite(chunkHeader);
 
 buffer.doWrite(chunk);
@@ -120,12 +120,12 @@ public class ChunkedOutputFilter implements OutputFilter {
 
 private int calculateChunkHeader(int len) {
 // Calculate chunk header
-int pos = 7;
+int pos = 8;
 int current = len;
 while (current > 0) {
 int digit = current % 16;
 current = current / 16;
-chunkHeader.put(pos--, HexUtils.getHex(digit));
+chunkHeader.put(--pos, HexUtils.getHex(digit));
 }
 return pos;
 }


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



buildbot failure in on tomcat-7-trunk

2019-09-09 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-7-trunk/builds/1444

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' 
triggered this build
Build Source Stamp: [branch 7.0.x] 2efd3a65929374bc9e22fc7902de1ed4af695cc5
Blamelist: Mark Thomas 

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



[Bug 63739] Automatic-Module-Names in embedded jars are language-level invalid

2019-09-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63739

Rob  changed:

   What|Removed |Added

   Priority|P2  |P1

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



[tomcat] branch 7.0.x updated: Fix Javadoc issues preventing release builds with newer Java versions

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 2efd3a6  Fix Javadoc issues preventing release builds with newer Java 
versions
2efd3a6 is described below

commit 2efd3a65929374bc9e22fc7902de1ed4af695cc5
Author: Mark Thomas 
AuthorDate: Fri Sep 6 16:21:18 2019 +0100

Fix Javadoc issues preventing release builds with newer Java versions

Enable release builds to be built with Java 10 onwards.
---
 build.properties.default   | 11 +++
 build.xml  | 58 +++
 java/javax/servlet/jsp/tagext/VariableInfo.java| 56 +++
 .../org/apache/catalina/filters/ExpiresFilter.java | 30 
 java/org/apache/catalina/tribes/package.html   |  4 +-
 java/org/apache/juli/logging/package.html  |  2 +-
 java/org/apache/tomcat/util/buf/package.html   |  2 +-
 .../tomcat/util/digester/SetPropertiesRule.java|  4 +-
 java/org/apache/tomcat/util/digester/package.html  | 84 +-
 java/org/apache/tomcat/util/modeler/package.html   |  8 +--
 java/org/apache/tomcat/util/net/NioChannel.java| 10 +--
 webapps/docs/changelog.xml |  5 ++
 12 files changed, 152 insertions(+), 122 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 66ab7f5..f620925 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -306,3 +306,14 @@ 
cobertura.checksum.value=63a8c5b3f5c1226fcc52cc9c9ea2a812|705d23e5a8815aff3bc4ad
 cobertura.home=${base.path}/cobertura-${cobertura.version}
 cobertura.jar=${cobertura.home}/cobertura-${cobertura.version}.jar
 
cobertura.loc=${base-sf.loc}/cobertura/cobertura-${cobertura.version}-bin.tar.gz
+
+# - SAAJ API, used by Code Signing for releases -
+# - No longer part of JRE from Java 11 onwards  -
+# - CDDL Licensed   -
+saaj-api.version=1.3.5
+saaj-api.checksum.enabled=true
+saaj-api.checksum.algorithm=MD5|SHA-1
+saaj-api.checksum.value=caae8b4bf2c551155815331e9e96256f|1c399a7fea4d0262a6a39750e419c24f0c769586
+saaj-api.home=${base.path}/saaj-api-${saaj-api.version}
+saaj-api.jar=${saaj-api.home}/saaj-api-${saaj-api.version}.jar
+saaj-api.loc=${base-maven.loc}/javax/xml/soap/saaj-api/${saaj-api.version}/saaj-api-${saaj-api.version}.jar
diff --git a/build.xml b/build.xml
index 43eab71..c2dc4e2 100644
--- a/build.xml
+++ b/build.xml
@@ -28,10 +28,10 @@
   
   
   
+  
   
   
   
-  
 
   
   
@@ -84,6 +84,10 @@
   
   
 
+  
+  
+  
+
   
   
   
@@ -194,9 +198,16 @@
   
   
 
+  
+  
+  
+
   
   
 
+
   
 
   
@@ -573,7 +584,6 @@
 
 
 
-
 
 
   
@@ -581,6 +591,8 @@
 
 
 
+
+
   
 
 
@@ -1735,7 +1747,10 @@
 
 
+ inheritAll="false" target="compile" >
+  
+  
+
 
 
@@ -2024,7 +2039,8 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   encoding="ISO-8859-1"
   docencoding="ISO-8859-1"
   charset="ISO-8859-1"
-  additionalparam="-breakiterator -notimestamp"
+  additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
+  source="${compile.source}"
   maxmemory="512m"
   failonerror="true"
   executable="${java.7.home}/bin/javadoc">
@@ -2045,7 +2061,8 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   encoding="ISO-8859-1"
   docencoding="ISO-8859-1"
   charset="ISO-8859-1"
-  additionalparam="-breakiterator -notimestamp"
+  additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
+  source="${compile.source}"
   maxmemory="512m"
   failonerror="true"
   executable="${java.7.home}/bin/javadoc">
@@ -2066,7 +2083,8 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   encoding="ISO-8859-1"
   docencoding="ISO-8859-1"
   charset="ISO-8859-1"
-  additionalparam="-breakiterator -notimestamp"
+  additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
+  source="${compile.source}"
   maxmemory="512m"
   failonerror="true"
   executable="${java.7.home}/bin/javadoc">
@@ -2087,7 +2105,8 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   encoding="ISO-8859-1"
   docencoding="ISO-8859-1"
   charset="ISO-8859-1"
-  additionalparam="-breakiterator -notimestamp"
+  additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
+  source="${compile.source}"
   maxmemory="512m"
   failonerror="true"
   executable="${java.7.home}/bin/javadoc">
@@ -2107,10 +2126,12 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   

[Bug 63739] Automatic-Module-Names in embedded jars are language-level invalid

2019-09-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63739

Rob  changed:

   What|Removed |Added

Version|unspecified |9.0.24
 OS||All

-- 
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 63739] New: Automatic-Module-Names in embedded jars are language-level invalid

2019-09-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63739

Bug ID: 63739
   Summary: Automatic-Module-Names in embedded jars are
language-level invalid
   Product: Tomcat 9
   Version: unspecified
  Hardware: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Packaging
  Assignee: dev@tomcat.apache.org
  Reporter: rob.pl...@dai.co.uk
  Target Milestone: -

Hi this is a follow-up to 63555, to resolve which Automatic-Module-Names were
introduced into the MANIFEST.MF from 9.0.24.

Unfortunately, those module names are not valid because they contain hyphens.
Module descriptor files (module-info.java) are compiled into Java classes and
simply won't be able to reference them. It's rather like if a package name in a
.jar had hyphens in it; the package could not be used in an import.

This renders Tomcat impossible to use with the Java module system from 9.0.24,
a significantly more adverse situation than what the automatic module names are
supposed to address, as it blocks future CVE security patches.

There is some good advice on the matter here:
https://sormuras.github.io/blog/2018-11-16-invalid-automatic-module-names.html

Example invalid values from Tomcat 9.0.24:

Automatic-Module-Name: org.apache.tomcat-embed-core
Automatic-Module-Name: org.apache.tomcat-embed-jasper-el

What I would expect:

Automatic-Module-Name: org.apache.tomcat.embed.core
Automatic-Module-Name: org.apache.tomcat.embed.jasper.el

-- 
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 on tomcat-85-trunk

2019-09-09 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-85-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-85-trunk/builds/1921

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' 
triggered this build
Build Source Stamp: [branch 8.5.x] 5153065ededb55776b304d2c655efe4d12f0092b
Blamelist: Mark Thomas 

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



[tomcat] branch 7.0.x updated: Fix Javadoc errors with Java 9

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 535bcea  Fix Javadoc errors with Java 9
535bcea is described below

commit 535bceac6e01f71b6a0288252ebbd4fac6ef2a79
Author: Mark Thomas 
AuthorDate: Mon Sep 9 11:26:39 2019 +0100

Fix Javadoc errors with Java 9

Hopefully the last of the errors. Still lot sof warnings.
---
 java/org/apache/catalina/startup/Tomcat.java   |  3 +--
 .../org/apache/tomcat/jdbc/pool/DataSourceFactory.java | 13 ++---
 .../java/org/apache/tomcat/jdbc/pool/PooledConnection.java | 14 --
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/java/org/apache/catalina/startup/Tomcat.java 
b/java/org/apache/catalina/startup/Tomcat.java
index d638f8a..3dd0a23 100644
--- a/java/org/apache/catalina/startup/Tomcat.java
+++ b/java/org/apache/catalina/startup/Tomcat.java
@@ -690,11 +690,10 @@ public class Tomcat {
  * @param contextPath The context mapping to use, "" for root context.
  * @param docBase Base directory for the context, for static files.
  *  Must exist, relative to the server home
- * @param config Custom context configurator helper
+ * @param name Ignored. The contextPath will be used
  * @return the deployed context
  * @see #addWebapp(String, String)
  *
- * @param name Ignored. The contextPath will be used
  *
  * @deprecated Use {@link #addWebapp(Host, String, String)}
  */
diff --git 
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java
 
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java
index f60dd95..8e16bfd 100644
--- 
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java
+++ 
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java
@@ -53,7 +53,6 @@ import org.apache.juli.logging.LogFactory;
  *
  * @author Craig R. McClanahan
  * @author Dirk Verbeeck
- * @author Filip Hanik
  */
 public class DataSourceFactory implements ObjectFactory {
 private static final Log log = LogFactory.getLog(DataSourceFactory.class);
@@ -543,6 +542,7 @@ public class DataSourceFactory implements ObjectFactory {
  * given properties.
  *
  * @param properties the datasource configuration properties
+ * @return the datasource
  * @throws Exception if an error occurs creating the data source
  */
 public DataSource createDataSource(Properties properties) throws Exception 
{
@@ -571,14 +571,14 @@ public class DataSourceFactory implements ObjectFactory {
 log.warn("dataSourceJNDI property is configured, but local 
JNDI context is null.");
 }
 } catch (NamingException e) {
-log.debug("The name \""+poolProperties.getDataSourceJNDI()+"\" can 
not be found in the local context.");
+log.debug("The name \""+poolProperties.getDataSourceJNDI()+"\" 
cannot be found in the local context.");
 }
 if (jndiDS==null) {
 try {
 context = new InitialContext();
 jndiDS = context.lookup(poolProperties.getDataSourceJNDI());
 } catch (NamingException e) {
-log.warn("The name \""+poolProperties.getDataSourceJNDI()+"\" 
can not be found in the InitialContext.");
+log.warn("The name \""+poolProperties.getDataSourceJNDI()+"\" 
cannot be found in the InitialContext.");
 }
 }
 if (jndiDS!=null) {
@@ -587,10 +587,9 @@ public class DataSourceFactory implements ObjectFactory {
 }
 
 /**
- * Parse properties from the string. Format of the string must be 
[propertyName=property;]*
- * @param propText
- * @return Properties
- * @throws Exception
+ * Parse properties from the string. Format of the string must be 
[propertyName=property;]*.
+ * @param propText The properties string
+ * @return the properties
  */
 protected static Properties getProperties(String propText) {
 return PoolProperties.getProperties(propText,null);
diff --git 
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
 
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
index ee5fa83..05f9025 100644
--- 
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
+++ 
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
@@ -31,7 +31,6 @@ import 
org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;
 /**
  * Represents a pooled connection
  * and holds a reference to the {@link java.sql.Connection} object
- * @author Filip Hanik
  * @version 1.0
  */
 public class PooledConnection {
@@ -362,9 +361,9 @@ public class PooledConnection {
 }
 
 

[tomcat] branch 7.0.x updated: Fix typo

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 141c2e7  Fix typo
141c2e7 is described below

commit 141c2e76b1af4030b3c9bb52982b3775ce9adf88
Author: Mark Thomas 
AuthorDate: Mon Sep 9 11:19:39 2019 +0100

Fix typo
---
 java/org/apache/coyote/AbstractProtocol.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/org/apache/coyote/AbstractProtocol.java 
b/java/org/apache/coyote/AbstractProtocol.java
index 4ced5f9..bbbf090 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -547,7 +547,6 @@ public abstract class AbstractProtocol implements 
ProtocolHandler,
 if (oname != null) {
 Registry.getRegistry(null, null).unregisterComponent(oname);
 }
-}
 
 if (tpOname != null)
 Registry.getRegistry(null, null).unregisterComponent(tpOname);


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



[tomcat] branch 7.0.x updated: Fix Javadoc errors with Java 9. Align with 8.5.x.

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
 new de17b2f  Fix Javadoc errors with Java 9. Align with 8.5.x.
de17b2f is described below

commit de17b2fe096a6fab4fb42eb0e77f060cabacd459
Author: Mark Thomas 
AuthorDate: Mon Sep 9 11:15:08 2019 +0100

Fix Javadoc errors with Java 9. Align with 8.5.x.
---
 .../apache/catalina/ha/tcp/SimpleTcpCluster.java   | 22 +++---
 java/org/apache/catalina/startup/TldConfig.java|  2 +-
 java/org/apache/catalina/startup/Tomcat.java   | 80 +-
 .../apache/catalina/tribes/group/RpcChannel.java   |  3 +-
 java/org/apache/catalina/users/MemoryUser.java | 31 +++--
 .../apache/catalina/util/ExtensionValidator.java   | 10 ++-
 java/org/apache/catalina/util/RequestUtil.java |  4 +-
 java/org/apache/coyote/AbstractProtocol.java   | 25 +--
 java/org/apache/coyote/OutputBuffer.java   | 17 +++--
 java/org/apache/coyote/ProtocolHandler.java| 29 ++--
 java/org/apache/coyote/ajp/AjpMessage.java | 37 +++---
 .../compiler/tagplugin/TagPluginContext.java   | 14 +++-
 .../apache/tomcat/dbcp/dbcp/AbandonedConfig.java   |  2 +-
 .../tomcat/dbcp/jocl/JOCLContentHandler.java   |  2 +-
 .../tomcat/util/digester/SetPropertiesRule.java| 14 ++--
 .../apache/tomcat/util/net/AbstractEndpoint.java   |  4 +-
 .../apache/tomcat/jdbc/pool/PoolConfiguration.java | 65 ++
 17 files changed, 226 insertions(+), 135 deletions(-)

diff --git a/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java 
b/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
index c664751..c527df8 100644
--- a/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
+++ b/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
@@ -147,7 +147,7 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
 protected PropertyChangeSupport support = new PropertyChangeSupport(this);
 
 /**
- * The context name <->manager association for distributed contexts.
+ * The context name - manager association for distributed contexts.
  */
 protected Map managers =
 new HashMap();
@@ -261,7 +261,7 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
  */
 @Override
 public Container getContainer() {
-return (this.container);
+return this.container;
 }
 
 /**
@@ -307,6 +307,7 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
 /**
  * Get the cluster listeners associated with this cluster. If this Array 
has
  * no listeners registered, a zero-length array is returned.
+ * @return the listener array
  */
 public ClusterListener[] findClusterListeners() {
 if (clusterListeners.size() > 0) {
@@ -321,6 +322,7 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
 /**
  * Add cluster message listener and register cluster to this listener.
  *
+ * @param listener The new listener
  * @see 
org.apache.catalina.ha.CatalinaCluster#addClusterListener(org.apache.catalina.ha.ClusterListener)
  */
 @Override
@@ -334,6 +336,7 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
 /**
  * Remove message listener and deregister Cluster from listener.
  *
+ * @param listener The listener to remove
  * @see 
org.apache.catalina.ha.CatalinaCluster#removeClusterListener(org.apache.catalina.ha.ClusterListener)
  */
 @Override
@@ -345,7 +348,7 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
 }
 
 /**
- * get current Deployer
+ * @return the current Deployer
  */
 @Override
 public ClusterDeployer getClusterDeployer() {
@@ -354,6 +357,7 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
 
 /**
  * set a new Deployer, must be set before cluster started!
+ * @param clusterDeployer The associated deployer
  */
 @Override
 public void setClusterDeployer(ClusterDeployer clusterDeployer) {
@@ -568,6 +572,7 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
 /**
  * Remove an application from cluster replication bus.
  *
+ * @param manager The manager
  * @see org.apache.catalina.Cluster#removeManager(Manager)
  */
 @Override
@@ -583,11 +588,6 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
 }
 }
 
-/**
- * @param name
- * @param manager
- * @return TODO
- */
 @Override
 public String getManagerName(String name, Manager manager) {
 String clusterName = name ;
@@ -603,11 +603,6 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
 return clusterName;
 }
 
-/*
- * Get Manager
- *
- * @see org.apache.catalina.ha.CatalinaCluster#getManager(java.lang.String)
- */
 @Override
 public Manager 

[tomcat] branch 8.5.x updated: Align with 9.0.x. Javadoc and spacing.

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 5153065  Align with 9.0.x. Javadoc and spacing.
5153065 is described below

commit 5153065ededb55776b304d2c655efe4d12f0092b
Author: Mark Thomas 
AuthorDate: Mon Sep 9 11:14:37 2019 +0100

Align with 9.0.x. Javadoc and spacing.
---
 .../apache/catalina/ha/tcp/SimpleTcpCluster.java   |  1 -
 java/org/apache/catalina/startup/Tomcat.java   |  1 -
 java/org/apache/coyote/ProtocolHandler.java| 12 
 .../apache/tomcat/jdbc/pool/PoolConfiguration.java | 22 --
 4 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java 
b/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
index 762f711..2006643 100644
--- a/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
+++ b/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
@@ -795,7 +795,6 @@ public class SimpleTcpCluster extends LifecycleMBeanBase
 }
 }
 }
-return;
 }
 
 public int getChannelStartOptions() {
diff --git a/java/org/apache/catalina/startup/Tomcat.java 
b/java/org/apache/catalina/startup/Tomcat.java
index 297f1f4..78f0ae5 100644
--- a/java/org/apache/catalina/startup/Tomcat.java
+++ b/java/org/apache/catalina/startup/Tomcat.java
@@ -1044,7 +1044,6 @@ public class Tomcat {
 }
 }
 } catch (ClassCastException e) {
-return;
 }
 }
 }
diff --git a/java/org/apache/coyote/ProtocolHandler.java 
b/java/org/apache/coyote/ProtocolHandler.java
index 6d3842c..4e8d7c4 100644
--- a/java/org/apache/coyote/ProtocolHandler.java
+++ b/java/org/apache/coyote/ProtocolHandler.java
@@ -22,10 +22,8 @@ import org.apache.tomcat.util.net.SSLHostConfig;
 
 /**
  * Abstract the protocol implementation, including threading, etc.
- * Processor is single threaded and specific to stream-based protocols,
- * will not fit Jk protocols like JNI.
  *
- * This is the main interface to be implemented by a coyote connector.
+ * This is the main interface to be implemented by a coyote protocol.
  * Adapter is the main interface to be implemented by a coyote servlet
  * container.
  *
@@ -36,12 +34,18 @@ import org.apache.tomcat.util.net.SSLHostConfig;
 public interface ProtocolHandler {
 
 /**
+ * Return the adapter associated with the protocol handler.
+ * @return the adapter
+ */
+public Adapter getAdapter();
+
+
+/**
  * The adapter, used to call the connector.
  *
  * @param adapter The adapter to associate
  */
 public void setAdapter(Adapter adapter);
-public Adapter getAdapter();
 
 
 /**
diff --git 
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
 
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
index 839d46f..2359fc8 100644
--- 
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
+++ 
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
@@ -699,12 +699,13 @@ public interface PoolConfiguration {
 public void setUseEquals(boolean useEquals);
 
 /**
- * Time in milliseconds to keep this connection alive even when used.
- * When a connection is returned to the pool, the pool will check to see 
if the
- * ((now - time-when-connected)  maxAge) has been reached, and if so,
- * it closes the connection rather than returning it to the pool.
+ * Time in milliseconds to keep this connection before reconnecting.
+ * When a connection is idle, returned to the pool or borrowed from the 
pool, the pool will
+ * check to see if the ((now - time-when-connected)  maxAge) has been 
reached, and if so,
+ * it reconnects. Note that the age of idle connections will only be 
checked if
+ * {@link #getTimeBetweenEvictionRunsMillis()} returns a value greater 
than 0.
  * The default value is 0, which implies that connections will be left 
open and no
- * age check will be done upon returning the connection to the pool.
+ * age checks will be done.
  * This is a useful setting for database sessions that leak memory as it 
ensures that the session
  * will have a finite life span.
  * @return the time in milliseconds a connection will be open for when used
@@ -712,12 +713,13 @@ public interface PoolConfiguration {
 public long getMaxAge();
 
 /**
- * Time in milliseconds to keep this connection alive even when used.
- * When a connection is returned to the pool, the pool will check to see 
if the
- * ((now - time-when-connected)  maxAge) has been reached, and if so,
- * it closes the connection rather than returning it to the pool.
+ * Time in 

[tomcat] branch master updated: Polish. Spacing.

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 1a7944f  Polish. Spacing.
1a7944f is described below

commit 1a7944f31e1fc901b32af517d08fa2d4e5b6e08a
Author: Mark Thomas 
AuthorDate: Mon Sep 9 11:13:54 2019 +0100

Polish. Spacing.
---
 java/org/apache/coyote/ProtocolHandler.java  | 1 -
 .../src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java | 1 -
 2 files changed, 2 deletions(-)

diff --git a/java/org/apache/coyote/ProtocolHandler.java 
b/java/org/apache/coyote/ProtocolHandler.java
index 44d5359..b467558 100644
--- a/java/org/apache/coyote/ProtocolHandler.java
+++ b/java/org/apache/coyote/ProtocolHandler.java
@@ -179,5 +179,4 @@ public interface ProtocolHandler {
  * @return the protocols
  */
 public UpgradeProtocol[] findUpgradeProtocols();
-
 }
diff --git 
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
 
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
index f5962e9..2359fc8 100644
--- 
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
+++ 
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
@@ -910,5 +910,4 @@ public interface PoolConfiguration {
  * @return true if the statements are wrapped
  */
 public boolean getUseStatementFacade();
-
 }


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



buildbot success in on tomcat-trunk

2019-09-09 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/4583

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch master] 329cd983d764b4160a2cb197003dff21efea67d0
Blamelist: Mark Thomas 

Build succeeded!

Sincerely,
 -The Buildbot




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



[tomcat] branch 8.5.x updated: Polish. Align with 9.0.x.

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 4bce6f1  Polish. Align with 9.0.x.
4bce6f1 is described below

commit 4bce6f1af32bc352af8abe521d78163bd741fb59
Author: Mark Thomas 
AuthorDate: Mon Sep 9 10:30:06 2019 +0100

Polish. Align with 9.0.x.

Spacing, Javadoc, comments.
---
 .../catalina/loader/WebappClassLoaderBase.java |  2 +-
 .../apache/catalina/realm/GenericPrincipal.java|  2 +-
 java/org/apache/catalina/realm/JNDIRealm.java  |  3 --
 .../org/apache/catalina/security/SecurityUtil.java |  1 -
 .../apache/catalina/tribes/group/GroupChannel.java |  1 +
 .../apache/catalina/util/LifecycleMBeanBase.java   |  2 -
 java/org/apache/coyote/AbstractProcessor.java  |  1 +
 java/org/apache/coyote/Request.java|  4 +-
 java/org/apache/jasper/compiler/AntCompiler.java   |  1 -
 java/org/apache/juli/FileHandler.java  | 14 +++
 java/org/apache/tomcat/util/digester/Digester.java |  8 +---
 .../apache/tomcat/util/net/SecureNioChannel.java   | 49 +++---
 12 files changed, 48 insertions(+), 40 deletions(-)

diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java 
b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index 4287325..ee79208 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -325,7 +325,7 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 
 /**
  * The bootstrap class loader used to load the JavaSE classes. In some
- * implementations this class loader is always null and in
+ * implementations this class loader is always null and in
  * those cases {@link ClassLoader#getParent()} will be called recursively 
on
  * the system class loader and the last non-null result used.
  */
diff --git a/java/org/apache/catalina/realm/GenericPrincipal.java 
b/java/org/apache/catalina/realm/GenericPrincipal.java
index 64c0d30..caaf352 100644
--- a/java/org/apache/catalina/realm/GenericPrincipal.java
+++ b/java/org/apache/catalina/realm/GenericPrincipal.java
@@ -201,7 +201,7 @@ public class GenericPrincipal implements TomcatPrincipal, 
Serializable {
  * role, otherwise false
  */
 public boolean hasRole(String role) {
-if ("*".equals(role)) {// Special 2.4 role meaning everyone
+if ("*".equals(role)) { // Special 2.4 role meaning everyone
 return true;
 }
 if (role == null) {
diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index a69dd71..88ef9ce 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.catalina.realm;
 
 import java.io.IOException;
@@ -2917,8 +2916,6 @@ public class JNDIRealm extends RealmBase {
 public String getUserRoleId() {
 return userRoleId;
 }
-
-
 }
 }
 
diff --git a/java/org/apache/catalina/security/SecurityUtil.java 
b/java/org/apache/catalina/security/SecurityUtil.java
index 4a550ea..5736ca5 100644
--- a/java/org/apache/catalina/security/SecurityUtil.java
+++ b/java/org/apache/catalina/security/SecurityUtil.java
@@ -93,7 +93,6 @@ public final class SecurityUtil{
  * @param methodName the method to apply the security restriction
  * @param targetObject the Servlet on which the method will
  * be called.
- * @throws Exception an execution error occurred
  */
 public static void doAsPrivilege(final String methodName,
  final Servlet targetObject) throws 
Exception {
diff --git a/java/org/apache/catalina/tribes/group/GroupChannel.java 
b/java/org/apache/catalina/tribes/group/GroupChannel.java
index a8d5315..94759d5 100644
--- a/java/org/apache/catalina/tribes/group/GroupChannel.java
+++ b/java/org/apache/catalina/tribes/group/GroupChannel.java
@@ -71,6 +71,7 @@ public class GroupChannel extends ChannelInterceptorBase
  * If set to true, the channel will start a local thread for the heart 
beat.
  */
 protected boolean heartbeat = true;
+
 /**
  * If heartbeat == true then how often do we want this
  * heartbeat to run. default is one minute
diff --git a/java/org/apache/catalina/util/LifecycleMBeanBase.java 
b/java/org/apache/catalina/util/LifecycleMBeanBase.java
index 417015d..9463291 100644
--- a/java/org/apache/catalina/util/LifecycleMBeanBase.java
+++ b/java/org/apache/catalina/util/LifecycleMBeanBase.java
@@ -52,7 +52,6 @@ public abstract class LifecycleMBeanBase extends LifecycleBase
  */
 @Override
 protected 

[tomcat] branch master updated: Polish. Clean-up spacing, Javadoc and comments

2019-09-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 329cd98  Polish. Clean-up spacing, Javadoc and comments
329cd98 is described below

commit 329cd983d764b4160a2cb197003dff21efea67d0
Author: Mark Thomas 
AuthorDate: Mon Sep 9 10:29:10 2019 +0100

Polish. Clean-up spacing, Javadoc and comments
---
 java/org/apache/catalina/loader/WebappClassLoaderBase.java | 2 +-
 java/org/apache/catalina/realm/GenericPrincipal.java   | 2 +-
 java/org/apache/catalina/realm/JNDIRealm.java  | 3 ---
 java/org/apache/coyote/AbstractProcessor.java  | 1 +
 java/org/apache/tomcat/util/digester/Digester.java | 3 +--
 5 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java 
b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index 7418744..a62d5d8 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -327,7 +327,7 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 
 /**
  * The bootstrap class loader used to load the JavaSE classes. In some
- * implementations this class loader is always null and in
+ * implementations this class loader is always null and in
  * those cases {@link ClassLoader#getParent()} will be called recursively 
on
  * the system class loader and the last non-null result used.
  */
diff --git a/java/org/apache/catalina/realm/GenericPrincipal.java 
b/java/org/apache/catalina/realm/GenericPrincipal.java
index c249c36..6a848de 100644
--- a/java/org/apache/catalina/realm/GenericPrincipal.java
+++ b/java/org/apache/catalina/realm/GenericPrincipal.java
@@ -201,7 +201,7 @@ public class GenericPrincipal implements TomcatPrincipal, 
Serializable {
  * role, otherwise false
  */
 public boolean hasRole(String role) {
-if ("*".equals(role)) {// Special 2.4 role meaning everyone
+if ("*".equals(role)) { // Special 2.4 role meaning everyone
 return true;
 }
 if (role == null) {
diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index 5707cbf..ee71d0a 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.catalina.realm;
 
 import java.io.IOException;
@@ -2902,8 +2901,6 @@ public class JNDIRealm extends RealmBase {
 public String getUserRoleId() {
 return userRoleId;
 }
-
-
 }
 }
 
diff --git a/java/org/apache/coyote/AbstractProcessor.java 
b/java/org/apache/coyote/AbstractProcessor.java
index 1affefa..03984f9 100644
--- a/java/org/apache/coyote/AbstractProcessor.java
+++ b/java/org/apache/coyote/AbstractProcessor.java
@@ -90,6 +90,7 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 userDataHelper = new UserDataHelper(getLog());
 }
 
+
 /**
  * Update the current error state to the new error state if the new error
  * state is more severe than the current error state.
diff --git a/java/org/apache/tomcat/util/digester/Digester.java 
b/java/org/apache/tomcat/util/digester/Digester.java
index 3b0f35e..e3ed881 100644
--- a/java/org/apache/tomcat/util/digester/Digester.java
+++ b/java/org/apache/tomcat/util/digester/Digester.java
@@ -240,6 +240,7 @@ public class Digester extends DefaultHandler2 {
  */
 protected ArrayStack params = new ArrayStack<>();
 
+
 /**
  * The SAXParser we will use to parse the input stream.
  */
@@ -1949,6 +1950,4 @@ public class Digester extends DefaultHandler2 {
 return new StringBuilder(out);
 }
 }
-
-
 }


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