Browse Source

New upstream version 9.0.13

tags/upstream/9.0.13^0
Emmanuel Bourg 3 years ago
parent
commit
5da693313d
100 changed files with 7464 additions and 504 deletions
  1. +2
    -8
      BUILDING.txt
  2. +5
    -5
      CONTRIBUTING.md
  3. +60
    -0
      KEYS
  4. +1
    -1
      MERGE.txt
  5. +17
    -0
      NOTICE
  6. +2
    -7
      RELEASE-NOTES
  7. +4
    -4
      RUNNING.txt
  8. +41
    -0
      TOMCAT-NEXT.txt
  9. +1
    -1
      bin/catalina.sh
  10. +58
    -0
      bin/ciphers.bat
  11. +60
    -0
      bin/ciphers.sh
  12. +14
    -12
      bin/daemon.sh
  13. +114
    -0
      bin/makebase.bat
  14. +115
    -0
      bin/makebase.sh
  15. +7
    -7
      bin/setclasspath.sh
  16. +47
    -16
      build.properties.default
  17. +187
    -61
      build.xml
  18. +0
    -12
      conf/catalina.policy
  19. +0
    -7
      conf/catalina.properties
  20. +1
    -0
      conf/context.xml
  21. +4
    -0
      conf/logging.properties
  22. +17
    -6
      conf/web.xml
  23. +1
    -1
      java/javax/el/ArrayELResolver.java
  24. +6
    -9
      java/javax/el/ExpressionFactory.java
  25. +4
    -3
      java/javax/el/ImportHandler.java
  26. +1
    -1
      java/javax/el/ListELResolver.java
  27. +1
    -1
      java/javax/el/LocalStrings_es.properties
  28. +4
    -5
      java/javax/el/StaticFieldELResolver.java
  29. +21
    -3
      java/javax/el/Util.java
  30. +2
    -4
      java/javax/security/auth/message/config/AuthConfigFactory.java
  31. +2
    -0
      java/javax/servlet/AsyncContext.java
  32. +5
    -3
      java/javax/servlet/Filter.java
  33. +1
    -15
      java/javax/servlet/GenericFilter.java
  34. +2
    -2
      java/javax/servlet/LocalStrings_es.properties
  35. +1
    -1
      java/javax/servlet/LocalStrings_fr.properties
  36. +1
    -1
      java/javax/servlet/LocalStrings_ja.properties
  37. +23
    -0
      java/javax/servlet/RequestDispatcher.java
  38. +147
    -14
      java/javax/servlet/ServletContext.java
  39. +9
    -3
      java/javax/servlet/ServletContextAttributeListener.java
  40. +6
    -2
      java/javax/servlet/ServletContextListener.java
  41. +1
    -1
      java/javax/servlet/ServletRegistration.java
  42. +10
    -4
      java/javax/servlet/ServletRequest.java
  43. +9
    -3
      java/javax/servlet/ServletRequestAttributeListener.java
  44. +6
    -2
      java/javax/servlet/ServletRequestListener.java
  45. +1
    -2
      java/javax/servlet/ServletRequestWrapper.java
  46. +37
    -21
      java/javax/servlet/ServletResponse.java
  47. +1
    -2
      java/javax/servlet/SingleThreadModel.java
  48. +3
    -6
      java/javax/servlet/UnavailableException.java
  49. +57
    -15
      java/javax/servlet/http/Cookie.java
  50. +2
    -13
      java/javax/servlet/http/HttpFilter.java
  51. +0
    -1
      java/javax/servlet/http/HttpServlet.java
  52. +10
    -8
      java/javax/servlet/http/HttpServletMapping.java
  53. +78
    -2
      java/javax/servlet/http/HttpServletRequest.java
  54. +54
    -2
      java/javax/servlet/http/HttpServletRequestWrapper.java
  55. +39
    -6
      java/javax/servlet/http/HttpServletResponse.java
  56. +33
    -6
      java/javax/servlet/http/HttpServletResponseWrapper.java
  57. +5
    -10
      java/javax/servlet/http/HttpSession.java
  58. +6
    -2
      java/javax/servlet/http/HttpSessionActivationListener.java
  59. +9
    -3
      java/javax/servlet/http/HttpSessionAttributeListener.java
  60. +6
    -2
      java/javax/servlet/http/HttpSessionBindingListener.java
  61. +3
    -4
      java/javax/servlet/http/HttpSessionContext.java
  62. +6
    -2
      java/javax/servlet/http/HttpSessionListener.java
  63. +3
    -4
      java/javax/servlet/http/HttpUtils.java
  64. +3
    -3
      java/javax/servlet/http/LocalStrings_es.properties
  65. +7
    -7
      java/javax/servlet/http/LocalStrings_fr.properties
  66. +8
    -8
      java/javax/servlet/http/LocalStrings_ja.properties
  67. +2
    -3
      java/javax/servlet/http/MappingMatch.java
  68. +2
    -2
      java/javax/servlet/http/PushBuilder.java
  69. +3101
    -0
      java/javax/servlet/resources/javaee_8.xsd
  70. +13
    -17
      java/javax/servlet/resources/javaee_web_services_1_4.xsd
  71. +27
    -31
      java/javax/servlet/resources/javaee_web_services_client_1_4.xsd
  72. +368
    -0
      java/javax/servlet/resources/web-app_4_0.xsd
  73. +1477
    -0
      java/javax/servlet/resources/web-common_4_0.xsd
  74. +343
    -0
      java/javax/servlet/resources/web-fragment_4_0.xsd
  75. +30
    -0
      java/javax/transaction/HeuristicCommitException.java
  76. +30
    -0
      java/javax/transaction/HeuristicMixedException.java
  77. +30
    -0
      java/javax/transaction/HeuristicRollbackException.java
  78. +30
    -0
      java/javax/transaction/InvalidTransactionException.java
  79. +30
    -0
      java/javax/transaction/NotSupportedException.java
  80. +30
    -0
      java/javax/transaction/RollbackException.java
  81. +30
    -0
      java/javax/transaction/Status.java
  82. +22
    -0
      java/javax/transaction/Synchronization.java
  83. +38
    -0
      java/javax/transaction/SystemException.java
  84. +42
    -0
      java/javax/transaction/Transaction.java
  85. +41
    -0
      java/javax/transaction/TransactionManager.java
  86. +30
    -0
      java/javax/transaction/TransactionRequiredException.java
  87. +30
    -0
      java/javax/transaction/TransactionRolledbackException.java
  88. +33
    -0
      java/javax/transaction/TransactionSynchronizationRegistry.java
  89. +34
    -0
      java/javax/transaction/UserTransaction.java
  90. +64
    -0
      java/javax/transaction/xa/XAException.java
  91. +52
    -0
      java/javax/transaction/xa/XAResource.java
  92. +28
    -0
      java/javax/transaction/xa/Xid.java
  93. +1
    -3
      java/javax/websocket/ContainerProvider.java
  94. +2
    -4
      java/javax/websocket/server/ServerEndpointConfig.java
  95. +4
    -22
      java/org/apache/catalina/Cluster.java
  96. +2
    -3
      java/org/apache/catalina/ContainerEvent.java
  97. +32
    -37
      java/org/apache/catalina/Context.java
  98. +4
    -4
      java/org/apache/catalina/Host.java
  99. +69
    -0
      java/org/apache/catalina/Manager.java
  100. +2
    -24
      java/org/apache/catalina/Pipeline.java

+ 2
- 8
BUILDING.txt View File

@@ -20,7 +20,7 @@
====================================================

This subproject contains the source code for Tomcat @VERSION_MAJOR_MINOR@, a container that
implements the Servlet 3.1, JSP 2.3, EL 3.0, WebSocket 1.1 and JASPIC 1.1
implements the Servlet 4.0, JSP 2.3, EL 3.0, WebSocket 1.1 and JASPIC 1.1
specifications from the Java Community Process <https://www.jcp.org/>.

Note: If you just need to run Apache Tomcat, it is not necessary to build
@@ -35,7 +35,7 @@ source distribution, do the following:

1. If the JDK is already installed, skip to (2).

2. Download a version 7 of Java Development Kit (JDK) release (use the
2. Download a version 8 of Java Development Kit (JDK) release (use the
latest update available for your chosen version) from one of:

http://www.oracle.com/technetwork/java/javase/downloads/index.html
@@ -297,12 +297,6 @@ You can build them by using the following commands:
codesigning.service=Microsoft Windows Signing

Release managers will be provided with the necessary credentials by the PMC.
It will also be necessary to enable TLS 1.1 and TLS 1.2 by default (they are
disabled by default on Java 7) for the build process to communicate with the
code signing service. The simplest way is by setting the ANT_OPTS
environment variable. E.g. (for Windows):

set ANT_OPTS=-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2

4. Build the release:



+ 5
- 5
CONTRIBUTING.md View File

@@ -53,7 +53,7 @@ Tomcat Connectors products in Bugzilla.
Excited yet? This section will guide you through providing a patch to the
committers of the project for review and acceptance.

##### Chose Your Method of Submission
##### Choose Your Method of Submission

You can provide a patch in one of the following ways (in order of preference):

@@ -90,13 +90,13 @@ committers to learn how to do this are found
[here](https://www.apache.org/dev/contributors.html#svnbasics). However, in the
interest of a fast ramp up, the short version is below. Note that the root of
the SVN repository is
[tomcat/trunk](http://svn.apache.org/repos/asf/tomcat/trunk),
[tomcat/trunk](https://svn.apache.org/repos/asf/tomcat/trunk),
but you can clone specific versions too, such as
[tc8.5.x](http://svn.apache.org/repos/asf/tomcat/tc8.5.x/trunk/) or even tags (
[TOMCAT_8_5_15](http://svn.apache.org/repos/asf/tomcat/tc8.5.x/tags/TOMCAT_8_5_15/)).
[tc8.5.x](https://svn.apache.org/repos/asf/tomcat/tc8.5.x/trunk/) or even tags (
[TOMCAT_8_5_15](https://svn.apache.org/repos/asf/tomcat/tc8.5.x/tags/TOMCAT_8_5_15/)).

```
$ svn co http://svn.apache.org/repos/asf/tomcat/trunk/
$ svn co https://svn.apache.org/repos/asf/tomcat/trunk/
```

##### Github


+ 60
- 0
KEYS View File

@@ -614,3 +614,63 @@ QCuUl/v3Zly66jThcNS/U6S9VXBtQRxDZtkL8pSzmJxaFvvnZgkQ/hlvJ8f9ccS7
2/KQU94=
=yvcP
-----END PGP PUBLIC KEY BLOCK-----

pub rsa4096 2018-10-20 [SC]
7659 0809 9ACF 9270 2C7D 949B FA0C 35EA 8AA2 99F1
uid Konstantin Kolinko (CODE SIGNING KEY) <kkolinko@apache.org>
sig 3 FA0C35EA8AA299F1 2018-10-20 Konstantin Kolinko (CODE SIGNING KEY) <kkolinko@apache.org>
sub rsa4096 2018-10-20 [E]
sig FA0C35EA8AA299F1 2018-10-20 Konstantin Kolinko (CODE SIGNING KEY) <kkolinko@apache.org>

-----BEGIN PGP PUBLIC KEY BLOCK-----

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
mSKqKZpUdvO77XQVYsjBAu3aMluPBNo=
=uK1p
-----END PGP PUBLIC KEY BLOCK-----

+ 1
- 1
MERGE.txt View File

@@ -49,7 +49,7 @@ GIT
Updates from Git are applied manually via patch files. Patch files are generated
using:
git diff <last SHA1>:<sub-tree> HEAD:<sub-tree> > temp.patch
The more recently merged SHA1 for the component below should be updated after
The most recently merged SHA1 for the component below should be updated after
the patch file has been applied and committed

FileUpload


+ 17
- 0
NOTICE View File

@@ -10,6 +10,9 @@ developed by the Netty project
and from finagle-native developed at Twitter
(https://github.com/twitter/finagle).

This software contains code derived from jgroups-kubernetes
developed by the JGroups project (http://www.jgroups.org/).

The Windows Installer is built with the Nullsoft
Scriptable Install System (NSIS), which is
open source software. The original software and
@@ -21,6 +24,10 @@ JDT Core Batch Compiler component, which is open source software.
The original software and related information is available at
https://www.eclipse.org/jdt/core/.

org.apache.tomcat.util.json.JSONParser.jj is a public domain javacc grammar
for JSON written by Robert Fischer.
https://github.com/RobertFischer/json-parser

For portions of the Tomcat JNI OpenSSL API and the OpenSSL JSSE integration
The org.apache.tomcat.jni and the org.apache.tomcat.net.openssl packages
are derivative work originating from the Netty project and the finagle-native
@@ -28,6 +35,12 @@ project developed at Twitter
* Copyright 2014 The Netty Project
* Copyright 2014 Twitter

For portions of the Tomcat cloud support
The org.apache.catalina.tribes.membership.cloud package contains derivative
work originating from the jgroups project.
https://github.com/jgroups-extras/jgroups-kubernetes
Copyright 2002-2018 Red Hat Inc.

The original XML Schemas for Java EE Deployment Descriptors:
- javaee_5.xsd
- javaee_web_services_1_2.xsd
@@ -46,6 +59,10 @@ The original XML Schemas for Java EE Deployment Descriptors:
- web-app_3_1.xsd
- web-common_3_1.xsd
- web-fragment_3_1.xsd
- javaee_8.xsd
- web-app_4_0.xsd
- web-common_4_0.xsd
- web-fragment_4_0.xsd

may be obtained from:
http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html

+ 2
- 7
RELEASE-NOTES View File

@@ -38,7 +38,7 @@ CONTENTS:
===================
Dependency Changes:
===================
Tomcat @VERSION_MAJOR_MINOR@ is designed to run on Java SE 7 and later.
Tomcat @VERSION_MAJOR_MINOR@ is designed to run on Java SE 8 and later.


==============
@@ -57,11 +57,6 @@ removed or changed although it may be deprecated.
Note: As Tomcat @VERSION_MAJOR@ matures, the above list will be added to. The list is not
considered complete at this time.

Note: A large number of deprecated methods, fields and configuration options
were removed in the transition from 8.0.x to 8.5.x. If any of those
removals triggers significant problems for the user community that the
deletion may be reverted in a later point release.

The remaining classes are considered part of the Tomcat internals and may change
without notice between point releases.

@@ -82,7 +77,7 @@ for use by web applications (by placing them in "lib"):
* jasper.jar (Jasper 2 Compiler and Runtime)
* jasper-el.jar (Jasper 2 EL implementation)
* jsp-api.jar (JSP 2.3 API)
* servlet-api.jar (Servlet 3.1 API)
* servlet-api.jar (Servlet 4.0 API)
* tomcat-api.jar (Interfaces shared by Catalina and Jasper)
* tomcat-coyote.jar (Tomcat connectors and utility classes)
* tomcat-dbcp.jar (package renamed database connection pool based on Commons DBCP 2)


+ 4
- 4
RUNNING.txt View File

@@ -20,16 +20,16 @@
===================================================

Apache Tomcat @VERSION_MAJOR_MINOR@ requires a Java Standard Edition Runtime
Environment (JRE) version 7 or later.
Environment (JRE) version 8 or later.

=============================
Running With JRE 7 Or Later
Running With JRE 8 Or Later
=============================

(1) Download and Install a Java SE Runtime Environment (JRE)

(1.1) Download a Java SE Runtime Environment (JRE),
release version 7 or later, from
release version 8 or later, from
http://www.oracle.com/technetwork/java/javase/downloads/index.html

(1.2) Install the JRE according to the instructions included with the
@@ -157,7 +157,7 @@ create the following script file:

On Windows, %CATALINA_BASE%\bin\setenv.bat:

set "JRE_HOME=%ProgramFiles%\Java\jre7"
set "JRE_HOME=%ProgramFiles%\Java\jre8"
exit /b 0

On *nix, $CATALINA_BASE/bin/setenv.sh:


+ 41
- 0
TOMCAT-NEXT.txt View File

@@ -0,0 +1,41 @@
================================================================================
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.
================================================================================

Notes of things to consider for the next major Tomcat release (10.0.x)

Items carried over from the 9.0.x list:

1. Remove the use of system properties to control configuration wherever
possible.

2. Reduce instances of setters and getters for the same property existing on an
object and its parent. This may require new objects to be exposed via JMX.

3. Consider wrapping the SocketWrapper with a facade to detect / prevent
components retaining references longer than they should.

New items for 10.0.x onwards:

1. Remove APR connector.

2. Remove org.apache.tomcat.jni and replace with the minimum necessary to
interface with OpenSSL and clones.

3. Remove the ExtensionValidator and associated classes (assuming that the
minimum Java version is Java 9 or later).

4. New embedded APIs (likely also for 9.x).

+ 1
- 1
bin/catalina.sh View File

@@ -296,7 +296,7 @@ if [ -z "$USE_NOHUP" ]; then
fi
unset _NOHUP
if [ "$USE_NOHUP" = "true" ]; then
_NOHUP=nohup
_NOHUP="nohup"
fi

# Add the JAVA 9 specific start-up parameters required by Tomcat


+ 58
- 0
bin/ciphers.bat View File

@@ -0,0 +1,58 @@
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. You may obtain a copy of the License at
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

rem ---------------------------------------------------------------------------
rem Script to digest password using the algorithm specified
rem ---------------------------------------------------------------------------

setlocal

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
set "CATALINA_HOME=%CURRENT_DIR%"
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
cd ..
set "CATALINA_HOME=%cd%"
cd "%CURRENT_DIR%"
:gotHome
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
echo The CATALINA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome

set "EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat"

rem Check that target executable exists
if exist "%EXECUTABLE%" goto okExec
echo Cannot find "%EXECUTABLE%"
echo This file is needed to run this program
goto end
:okExec

rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs

call "%EXECUTABLE%" org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser %CMD_LINE_ARGS%

:end

+ 60
- 0
bin/ciphers.sh View File

@@ -0,0 +1,60 @@
#!/bin/sh

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

# -----------------------------------------------------------------------------
# Script to digest password using the algorithm specified
# -----------------------------------------------------------------------------

# Better OS/400 detection: see Bugzilla 31132
os400=false
case "`uname`" in
OS400*) os400=true;;
esac

# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done

PRGDIR=`dirname "$PRG"`
EXECUTABLE=tool-wrapper.sh

# Check that target executable exists
if $os400; then
# -x will Only work on the os400 if the files are:
# 1. owned by the user
# 2. owned by the PRIMARY group of the user
# this will not work if the user belongs in secondary groups
eval
else
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
echo "Cannot find $PRGDIR/$EXECUTABLE"
echo "The file is absent or does not have execute permission"
echo "This file is needed to run this program"
exit 1
fi
fi

exec "$PRGDIR"/"$EXECUTABLE" org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser "$@"

+ 14
- 12
bin/daemon.sh View File

@@ -18,20 +18,22 @@
# -----------------------------------------------------------------------------
# Commons Daemon wrapper script.
# -----------------------------------------------------------------------------
#
# resolve links - $0 may be a softlink
ARG0="$0"
while [ -h "$ARG0" ]; do
ls=`ls -ld "$ARG0"`
PRG="$0"

while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
ARG0="$link"
PRG="$link"
else
ARG0="`dirname $ARG0`/$link"
PRG=`dirname "$PRG"`/"$link"
fi
done
DIRNAME="`dirname $ARG0`"
PROGRAM="`basename $ARG0`"

DIRNAME="`dirname "$PRG"`"
PROGRAM="`basename "$PRG"`"
while [ ".$1" != . ]
do
case "$1" in
@@ -100,10 +102,10 @@ if [ -z "$JAVA_HOME" ]; then
if expr "$link" : '/.*' > /dev/null; then
JAVA_BIN="$link"
else
JAVA_BIN="`dirname $JAVA_BIN`/$link"
JAVA_BIN="`dirname "$JAVA_BIN"`/$link"
fi
done
test -x "$JAVA_BIN" && JAVA_HOME="`dirname $JAVA_BIN`"
test -x "$JAVA_BIN" && JAVA_HOME="`dirname "$JAVA_BIN"`"
test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd`
else
JAVA_BIN="$JAVA_HOME/bin/java"
@@ -134,7 +136,7 @@ elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
fi

# Add on extra jar files to CLASSPATH
test ".$CLASSPATH" != . && CLASSPATH="${CLASSPATH}:"
test ".$CLASSPATH" != . && CLASSPATH="$CLASSPATH:"
CLASSPATH="$CLASSPATH$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/commons-daemon.jar"

test ".$CATALINA_OUT" = . && CATALINA_OUT="$CATALINA_BASE/logs/catalina-daemon.out"
@@ -168,7 +170,7 @@ if [ "$cygwin" = "false" ]; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ "$?" -eq 0 ]; then
# Darwin does not allow RLIMIT_INFINITY on file soft limit
if [ "$darwin" = "true" -a "$MAX_FD_LIMIT" = "unlimited" ]; then
if [ "$darwin" = "true" ] && [ "$MAX_FD_LIMIT" = "unlimited" ]; then
MAX_FD_LIMIT=`/usr/sbin/sysctl -n kern.maxfilesperproc`
fi
test ".$MAX_FD" = ".maximum" && MAX_FD="$MAX_FD_LIMIT"


+ 114
- 0
bin/makebase.bat View File

@@ -0,0 +1,114 @@
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. You may obtain a copy of the License at
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

rem This script creates the directory structure required for running Tomcat
rem in a separate directory by pointing %CATALINA_BASE% to it. It copies the
rem conf directory from %CATALINA_HOME%, and creates empty directories for
rem bin, lib, logs, temp, webapps, and work.
rem
rem If the file %CATALINA_HOME%/bin/setenv.sh exists then it is copied to
rem the target directory as well.
rem
rem Usage: makebase <path-to-target-directory> [-w | --webapps]

setlocal

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
set "CATALINA_HOME=%CURRENT_DIR%"
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
cd ..
set "CATALINA_HOME=%cd%"
cd "%CURRENT_DIR%"
:gotHome

if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
echo The CATALINA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto EOF
:okHome

rem first arg is the target directory
set BASE_TGT=%1

if %BASE_TGT%.==. (
rem target directory not provided; exit
echo Usage: makebase ^<path-to-target-directory^>
goto :EOF
)

set COPY_WEBAPPS=false

rem parse args
for %%a in (%*) do (
if "%%~a"=="--webapps" (
set COPY_WEBAPPS=true
)
if "%%~a"=="-w" (
set COPY_WEBAPPS=true
)
)

if exist %BASE_TGT% (
rem target directory exists
echo Target directory exists

rem exit if target directory is not empty
for /F %%i in ('dir /b %BASE_TGT%\*.*') do (
echo Target directory is not empty
goto :EOF
)
) else (
rem create the target directory
mkdir %BASE_TGT%
)

rem create empty directories
for %%d in (bin, conf, lib, logs, temp, webapps, work) do (
mkdir %BASE_TGT%\%%d
)

if "%COPY_WEBAPPS%" == "true" (
echo Copying webapps
robocopy %CATALINA_HOME%\webapps %BASE_TGT%\webapps /E > nul
rem copy conf directory recursively
robocopy %CATALINA_HOME%\conf %BASE_TGT%\conf /E > nul
) else (
rem copy conf directory without subdirectories and suppress warning
robocopy %CATALINA_HOME%\conf %BASE_TGT%\conf > nul
rem create empty ROOT directory
mkdir %BASE_TGT%\webapps\ROOT
)

rem copy setenv.bat if exists
robocopy %CATALINA_HOME%\bin %BASE_TGT%\bin setenv.bat > nul

echo Created CATALINA_BASE directory at %BASE_TGT%

echo.
echo You can launch the new instance by running:
echo set CATALINA_HOME=%CATALINA_HOME%
echo set CATALINA_BASE=%BASE_TGT%
echo %%CATALINA_HOME%%/bin/catalina.bat run

echo.
echo Attention: The ports in conf\server.xml might be bound by a
echo different instance. Please review your config files
echo and update them where necessary.
echo.

:EOF

+ 115
- 0
bin/makebase.sh View File

@@ -0,0 +1,115 @@
#!/bin/sh

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

# This script creates the directory structure required for running Tomcat
# in a separate directory by pointing $CATALINA_BASE to it. It copies the
# conf directory from $CATALINA_HOME, and creates empty directories for
# bin, lib, logs, temp, webapps, and work.
#
# If the file $CATALINA_HOME/bin/setenv.sh exists then it is copied to
# the target directory as well.
#
# Usage: makebase <path-to-target-directory> [-w | --webapps]

# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done

# Get standard environment variables
PRGDIR=`dirname "$PRG"`

# Only set CATALINA_HOME if not already set
[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`

# first arg is the target directory
BASE_TGT=$1

if [ -z "$BASE_TGT" ]; then
# target directory not provided; exit
echo "Usage: makebase <path-to-target-directory>"
exit 1
fi

COPY_WEBAPPS=false

# parse args
while [ "$1" != "" ]; do
case $1 in
-w | --webapps)
COPY_WEBAPPS=true
;;
esac
shift
done

if [ -d "$BASE_TGT" ]; then
# target directory exists
echo "Target directory exists"

# exit if target directory is not empty
[ "`ls -A "$BASE_TGT"`" ] && \
echo "Target directory is not empty" && \
exit 1
else
# create the target directory
mkdir -p "$BASE_TGT"
fi

for dir in bin conf lib logs temp webapps work;
do
# create empty directories
mkdir "$BASE_TGT/$dir"
done

if [ "$COPY_WEBAPPS" = true ]; then
echo "Copying webapps"
cp -r "$CATALINA_HOME/webapps" "$BASE_TGT/"
# copy conf directory recursively
cp -r "$CATALINA_HOME/conf" "$BASE_TGT/"
else
# copy conf directory without subdirectories and suppress warning
cp "${CATALINA_HOME}/conf"/* "$BASE_TGT/conf" 2> /dev/null
# create empty ROOT directory
mkdir "$BASE_TGT/webapps/ROOT"
fi

# copy setenv.sh if exists
[ -f "$CATALINA_HOME/bin/setenv.sh" ] && \
cp "$CATALINA_HOME/bin/setenv.sh" "$BASE_TGT/bin/"

echo "Created CATALINA_BASE directory at $BASE_TGT"

echo
echo "You can launch the new instance by running:"
echo " export CATALINA_HOME=$CATALINA_HOME"
echo " export CATALINA_BASE=$BASE_TGT"
echo " \$CATALINA_HOME/bin/catalina.sh run"

echo
echo "Attention: The ports in conf/server.xml might be bound by a "
echo " different instance. Please review your config files "
echo " and update them as necessary."
echo

+ 7
- 7
bin/setclasspath.sh View File

@@ -22,7 +22,7 @@
# -----------------------------------------------------------------------------

# Make sure prerequisite environment variables are set
if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
if [ -z "$JAVA_HOME" ] && [ -z "$JRE_HOME" ]; then
if $darwin; then
# Bugzilla 54390
if [ -x '/usr/libexec/java_home' ] ; then
@@ -34,8 +34,8 @@ if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
else
JAVA_PATH=`which java 2>/dev/null`
if [ "x$JAVA_PATH" != "x" ]; then
JAVA_PATH=`dirname $JAVA_PATH 2>/dev/null`
JRE_HOME=`dirname $JAVA_PATH 2>/dev/null`
JAVA_PATH=`dirname "$JAVA_PATH" 2>/dev/null`
JRE_HOME=`dirname "$JAVA_PATH" 2>/dev/null`
fi
if [ "x$JRE_HOME" = "x" ]; then
# XXX: Should we try other locations?
@@ -44,13 +44,13 @@ if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
fi
fi
fi
if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
if [ -z "$JAVA_HOME" ] && [ -z "$JRE_HOME" ]; then
echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
echo "At least one of these environment variable is needed to run this program"
exit 1
fi
fi
if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
if [ -z "$JAVA_HOME" ] && [ "$1" = "debug" ]; then
echo "JAVA_HOME should point to a JDK in order to run in debug mode."
exit 1
fi
@@ -61,14 +61,14 @@ fi
# If we're running under jdb, we need a full jdk.
if [ "$1" = "debug" ] ; then
if [ "$os400" = "true" ]; then
if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then
if [ ! -x "$JAVA_HOME"/bin/java ] || [ ! -x "$JAVA_HOME"/bin/javac ]; then
echo "The JAVA_HOME environment variable is not defined correctly"
echo "This environment variable is needed to run this program"
echo "NB: JAVA_HOME should point to a JDK not a JRE"
exit 1
fi
else
if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x "$JAVA_HOME"/bin/javac ]; then
if [ ! -x "$JAVA_HOME"/bin/java ] || [ ! -x "$JAVA_HOME"/bin/jdb ] || [ ! -x "$JAVA_HOME"/bin/javac ]; then
echo "The JAVA_HOME environment variable is not defined correctly"
echo "This environment variable is needed to run this program"
echo "NB: JAVA_HOME should point to a JDK not a JRE"


+ 47
- 16
build.properties.default View File

@@ -23,14 +23,15 @@
# -----------------------------------------------------------------------------

# ----- Version Control Flags -----
version.major=8
version.minor=5
version.build=35
version.major=9
version.minor=0
version.build=13
version.patch=0
version.suffix=

# ----- Build control flags -----
# Note enabling validation uses Checkstyle which is LGPL licensed
ant.version.required=1.9.8
execute.validate=false
execute.test.nio=true
execute.test.nio2=true
@@ -109,8 +110,8 @@ jaxrpc-lib.checksum.enabled=true
jaxrpc-lib.checksum.algorithm=MD5|SHA-1
jaxrpc-lib.checksum.value=4bebba22a4cdb9f68e16c45129770333|fe9371d33dc3e1646d4d13bde19614283eb998b1
jaxrpc-lib.home=${base.path}/jaxrpc-${jaxrpc-lib.version}
jaxrpc-lib.loc=${base-maven.loc}/geronimo-spec/geronimo-spec-jaxrpc/${jaxrpc-lib.version}/geronimo-spec-jaxrpc-${jaxrpc-lib.version}.jar
jaxrpc-lib.jar=${jaxrpc-lib.home}/geronimo-spec-jaxrpc-${jaxrpc-lib.version}.jar
jaxrpc-lib.loc=${base-maven.loc}/geronimo-spec/geronimo-spec-jaxrpc/${jaxrpc-lib.version}/geronimo-spec-jaxrpc-${jaxrpc-lib.version}.jar

# ----- Webservices - WSDL4J -----
wsdl4j-lib.version=1.6.3
@@ -118,21 +119,21 @@ wsdl4j-lib.checksum.enabled=true
wsdl4j-lib.checksum.algorithm=MD5|SHA-1
wsdl4j-lib.checksum.value=cfc28d89625c5e88589aec7a9aee0208|6d106a6845a3d3477a1560008479312888e94f2f
wsdl4j-lib.home=${base.path}/wsdl4j-${wsdl4j-lib.version}
wsdl4j-lib.loc=${base-maven.loc}/wsdl4j/wsdl4j/${wsdl4j-lib.version}/wsdl4j-${wsdl4j-lib.version}.jar
wsdl4j-lib.jar=${wsdl4j-lib.home}/wsdl4j-${wsdl4j-lib.version}.jar
wsdl4j-lib.loc=${base-maven.loc}/wsdl4j/wsdl4j/${wsdl4j-lib.version}/wsdl4j-${wsdl4j-lib.version}.jar

# ----- Eclipse JDT, version 4.5.1 or later -----#
# ----- Eclipse JDT, version 4.7 or later -----#
# See https://wiki.apache.org/tomcat/JDTCoreBatchCompiler before updating
#
# Checksum is from "SHA512 Checksums for 4.6.3" link at
# http://archive.eclipse.org/eclipse/downloads/drops4/R-4.6.3-201703010400/
# http://archive.eclipse.org/eclipse/downloads/drops4/R-4.6.3-201703010400/checksum/eclipse-4.6.3-SUMSSHA512
# Checksum is from "SHA512 Checksums for 4.7.3a" link at
# http://download.eclipse.org/eclipse/downloads/drops4/R-4.7.3a-201803300640/
# http://download.eclipse.org/eclipse/downloads/drops4/R-4.7.3a-201803300640/checksum/eclipse-4.7.3a-SUMSSHA512
#
jdt.version=4.6.3
jdt.release=R-4.6.3-201703010400
jdt.version=4.7.3a
jdt.release=R-4.7.3a-201803300640
jdt.checksum.enabled=true
jdt.checksum.algorithm=SHA-512
jdt.checksum.value=372da97d5f37095a3616c730170dc541b93acb8f50370cd9b0d81fba4583e865f0c933dc012155f26638306b82a402eaab209123cd0a979fa7c86313c0fca477
jdt.checksum.value=7287b1ea3e18423d027a99ce40ae72e46e1700a65b474d2ec09af6a17b10653b7c2e69e9bb87efe14f4c593dc66b6370ea566fce90edb4b4190a903046817e6f
jdt.home=${base.path}/ecj-${jdt.version}
jdt.jar=${jdt.home}/ecj-${jdt.version}.jar
# The download will be moved to the archive area eventually. We are taking care of that in advance.
@@ -250,8 +251,8 @@ checkstyle.checksum.enabled=true
checkstyle.checksum.algorithm=MD5|SHA-1
checkstyle.checksum.value=9180ab8b8219b262bfe88f26fd95d26d|11a02d7b0374f8a82fbd76361a69756faa6aefa0
checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle/${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle/${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar

# ----- Cobertura code coverage tool -----
cobertura.version=2.1.1
@@ -260,7 +261,6 @@ cobertura.checksum.algorithm=MD5|SHA-1
cobertura.checksum.value=4f46638aa8e4d89565c038092398ea06|99cb44d36555feedcedc46263c23c2f5394ef342
cobertura.home=${base.path}/cobertura-${cobertura.version}
cobertura.jar=${cobertura.home}/cobertura-${cobertura.version}.jar
cobertura.lib=${cobertura.home}/lib
cobertura.loc=${base-sf.loc}/cobertura/cobertura-2.1.1-bin.tar.gz

# ----- Findbugs -----
@@ -269,6 +269,37 @@ findbugs.checksum.enabled=true
findbugs.checksum.algorithm=MD5|SHA-1
findbugs.checksum.value=dec8828de8657910fcb258ce5383c168|59a24064ca6869e483ce9a04d3c50d14a227d5e6
findbugs.home=${base.path}/findbugs-${findbugs.version}
findbugs.lib=${findbugs.home}/lib
findbugs.jar=${findbugs.lib}/findbugs-ant.jar
findbugs.jar=${findbugs.home}/lib/findbugs-ant.jar
findbugs.loc=${base-sf.loc}/project/findbugs/findbugs/${findbugs.version}/findbugs-${findbugs.version}.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

# ----- bnd & bndlib, version 4.0.0 or later -----
# ----- provides OSGI metadata for JARs -----
bnd.version=4.0.0

# checksums for biz.aQute.bnd-4.0.0.jar, biz.aQute.bndlib-4.0.0.jar
bnd.checksum.enabled=true
bnd.checksum.algorithm=MD5|SHA-1
bnd.checksum.value=ddf578a4413ffa0eb6dc5b9476318fe2|fa7746eb710852498ce1afe5227be3fbfddaf09e

bndlib.checksum.enabled=true
bndlib.checksum.algorithm=MD5|SHA-1
bndlib.checksum.value=7aa264bf3b6b32a11eea4a6cf43a9aaa|21e1d6fd1874d9bc201f2de1d0a48e84bff4149d

bnd.home=${base.path}/bnd-${bnd.version}
bnd.jar=${bnd.home}/biz.aQute.bnd-${bnd.version}.jar
bnd.loc=${base-maven.loc}/biz/aQute/bnd/biz.aQute.bnd/${bnd.version}/biz.aQute.bnd-${bnd.version}.jar

bndlib.home=${base.path}/bndlib-${bnd.version}
bndlib.jar=${bndlib.home}/biz.aQute.bndlib-${bnd.version}.jar
bndlib.loc=${base-maven.loc}/biz/aQute/bnd/biz.aQute.bndlib/${bnd.version}/biz.aQute.bndlib-${bnd.version}.jar

+ 187
- 61
build.xml View File

@@ -15,7 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="Tomcat 8.5" default="deploy" basedir="."
<project name="Tomcat 9.0" default="deploy" basedir="."
xmlns:if="ant:if" xmlns:unless="ant:unless">

<!-- ===================== Initialize Property Values ==================== -->
@@ -33,6 +33,13 @@
<property file="build.properties"/>
<property file="build.properties.default"/>

<!-- Check Ant Version -->
<fail message="Ant version ${ant.version.required} or newer is required (${ant.version} is installed)">
<condition>
<not><antversion atleast="${ant.version.required}" /></not>
</condition>
</fail>

<!-- Project Name -->
<property name="project" value="apache-tomcat" />

@@ -42,17 +49,17 @@
<property name="version.major.minor" value="${version.major}.${version.minor}" />

<!-- constant to declare a file binary for md5sum -->
<property name="md5sum.binary-prefix" value=" *" />
<property name="md5sum.binary-prefix" value=" *" />

<!-- Exact spec versions (for the manifests) -->
<property name="servlet.revision" value="FR" />
<property name="jsp.revision" value="FR" />
<property name="el.revision" value="FR" />
<property name="websocket.revision" value="FR" />
<property name="servlet.revision" value="FR" />
<property name="jsp.revision" value="FR" />
<property name="el.revision" value="FR" />
<property name="websocket.revision" value="FR" />
<!-- MR B but this was first 1.1 release so use FR -->
<property name="jaspic.revision" value="FR" />
<!-- MR 2 but this was first 1.2 release so use FR -->
<property name="annotation.revision" value="FR" />
<property name="jaspic.revision" value="FR" />
<!-- MR 3 but this was first 1.3 release so use FR -->
<property name="annotation.revision" value="FR" />

<!-- Release artifact base names -->
<property name="final.name" value="${project}-${version}" />
@@ -62,6 +69,7 @@
<property name="tomcat.home" value="${basedir}"/>
<property name="tomcat-nb.home" value="${basedir}/nbproject" />
<property name="tomcat.output" value="${basedir}/output"/>
<property name="tomcat.bnd" value="${tomcat.output}/bnd"/>
<property name="tomcat.build" value="${tomcat.output}/build"/>
<property name="tomcat.classes" value="${tomcat.output}/classes"/>
<property name="tomcat.deployer" value="${tomcat.output}/deployer"/>
@@ -78,16 +86,16 @@
<property name="test.temp" value="${tomcat.output}/test-tmp"/>
<property name="test.basedir" value="${tomcat.build}"/>
<property name="test.reports" value="${test.basedir}/logs"/>
<property name="test.apr.loc" value="${test.basedir}/bin/native"/>
<property name="test.apr.loc" value="${test.basedir}/bin"/>
<!-- base directory for jdbc-pool -->
<property name="tomcat.jdbc.dir" value="${basedir}/modules/jdbc-pool"/>
<!-- build output directory for jdbc-pool -->
<property name="tomcat.pool" value="${tomcat.output}/jdbc-pool"/>

<!-- Servlet 3.1 spec requires 1.7+ -->
<property name="compile.source" value="1.7"/>
<property name="compile.target" value="1.7"/>
<property name="compile.release" value="7"/>
<!-- Servlet 4.0 spec requires 1.8+ -->
<property name="compile.source" value="1.8"/>
<property name="compile.target" value="1.8"/>
<property name="compile.release" value="8"/>

<!-- Locations to create the JAR artifacts -->
<!-- Standard JARs -->
@@ -204,6 +212,7 @@
<!-- Classpaths -->
<path id="compile.classpath">
<pathelement location="${jdt.jar}"/>
<pathelement location="${saaj-api.jar}"/>
</path>

<path id="tomcat.classpath">
@@ -258,6 +267,7 @@
<include name="**/javax.websocket.ContainerProvider"/>
<include name="**/javax.websocket.server.ServerEndpointConfig$Configurator"/>
<include name="**/.gitignore"/>
<include name="**/*.bnd"/>
<include name="**/*.classpath"/>
<include name="**/*.css"/>
<include name="**/*.dtd"/>
@@ -285,6 +295,7 @@
<include name="**/*.project"/>
<include name="**/*.properties"/>
<include name="**/*.properties.default"/>
<include name="**/*.shtml"/>
<include name="**/*.svg"/>
<include name="**/*.tag"/>
<include name="**/*.tagx"/>
@@ -378,6 +389,7 @@
<include name="org/apache/tomcat/util/res/**" />
<include name="org/apache/tomcat/util/security/**" />
<include name="org/apache/tomcat/util/threads/**" />
<include name="org/apache/tomcat/util/json/**" />
<include name="org/apache/tomcat/util/*" />
<exclude name="org/apache/tomcat/util/bcel" />
<exclude name="org/apache/tomcat/util/descriptor" />
@@ -536,6 +548,18 @@
</srcfiles>
</uptodate>

<!-- Property that determines if OSGI bnd files need updating -->
<uptodate property="bnd.uptodate"
targetfile="${tomcat.bnd}/annotations-api.bnd" >
<srcfiles file="${user.home}/build.properties" />
<srcfiles file="${basedir}/build.properties" />
<srcfiles file="${basedir}/build.properties.default" />
<srcfiles file="${basedir}/build.xml" />
<srcfiles dir="${tomcat.home}/res/bnd" >
<include name="*.bnd" />
</srcfiles>
</uptodate>

</target>

<target name="validate" if="${execute.validate}"
@@ -572,8 +596,10 @@
<exclude name="java/org/apache/**/parser/ParseException.java" />
<exclude name="java/org/apache/**/parser/SimpleCharStream.java" />
<exclude name="java/org/apache/**/parser/Token*.java" />
<exclude name="java/org/apache/tomcat/util/json/*.java" />
<!-- Exclude simple test files -->
<exclude name="test/webapp/bug53257/**/*.txt"/>
<exclude name="test/webapp/bug49nnn/bug49464*"/>
<exclude name="test/webapp-fragments/WEB-INF/classes/*.txt"/>
<exclude name="test/webresources/**"/>
<!-- Exclude test files with unusual encodings -->
@@ -585,6 +611,7 @@
<fileset dir="modules/jdbc-pool" >
<exclude name=".*/**"/>
<exclude name="**/MANIFEST.MF"/>
<exclude name="build.properties" />
<patternset refid="text.files" />
</fileset>
</checkstyle>
@@ -684,6 +711,8 @@
<filterset refid="version.filters"/>
<fileset dir="java">
<include name="**/*.properties"/>
<exclude name="**/LocalStrings*.properties"/>
<exclude name="**/Messages*.properties"/>
<include name="**/*.dtd"/>
<include name="**/*.tasks"/>
<include name="**/*.xsd"/>
@@ -691,6 +720,11 @@
</fileset>
</copy>

<!-- Convert the message files from UTF-8 to ASCII. This can be removed
after upgrading to Java 9+ as the minimum JRE and specifying the encoding
when loading the ResourceBundles -->
<native2ascii src="java" dest="${tomcat.classes}" includes="**/LocalStrings*.properties,**/Messages*.properties" encoding="UTF-8"/>

</target>

<target name="build-manifests" unless="manifests.uptodate"
@@ -714,50 +748,69 @@

</target>

<target name="package" depends="compile,build-manifests" >
<!-- Common Annotations 1.2 JAR File -->
<target name="build-bnd" unless="bnd.uptodate"
depends="setup-bnd,build-prepare">

<mkdir dir="${tomcat.bnd}" />
<copy todir="${tomcat.bnd}" overwrite="yes" filtering="yes"
encoding="ISO-8859-1">
<filterset refid="version.filters"/>
<fileset dir="${tomcat.home}/res/bnd" />
</copy>

</target>

<target name="package" depends="compile,build-manifests,build-bnd" >
<!-- Common Annotations 1.3 JAR File -->
<jarIt jarfile="${annotations-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.annotations-api"
manifest="${tomcat.manifests}/annotations-api.jar.manifest" />
manifest="${tomcat.manifests}/annotations-api.jar.manifest"
addOSGi="true" />

<!-- Servlet 3.1 Implementation JAR File -->
<!-- Servlet 4.0 Implementation JAR File -->
<jarIt jarfile="${servlet-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.servlet-api"
manifest="${tomcat.manifests}/servlet-api.jar.manifest"
notice="${tomcat.manifests}/servlet-api.jar.notice"
license="${tomcat.manifests}/servlet-api.jar.license" />
license="${tomcat.manifests}/servlet-api.jar.license"
addOSGi="true" />

<!-- JSP 2.3 Implementation JAR File -->
<jarIt jarfile="${jsp-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.jsp-api"
manifest="${tomcat.manifests}/jsp-api.jar.manifest" />
manifest="${tomcat.manifests}/jsp-api.jar.manifest"
addOSGi="true" />

<!-- EL 3.0 Implementation JAR File -->
<jarIt jarfile="${el-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.el-api"
manifest="${tomcat.manifests}/el-api.jar.manifest" />
manifest="${tomcat.manifests}/el-api.jar.manifest"
addOSGi="true" />

<!-- WebSocket 1.1 API JAR File -->
<jarIt jarfile="${websocket-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.websocket-api"
manifest="${tomcat.manifests}/websocket-api.jar.manifest" />
manifest="${tomcat.manifests}/websocket-api.jar.manifest"
addOSGi="true" />

<!-- JASPIC 1.1 API JAR File -->
<jarIt jarfile="${jaspic-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.jaspic-api"
manifest="${tomcat.manifests}/jaspic-api.jar.manifest" />
manifest="${tomcat.manifests}/jaspic-api.jar.manifest"
addOSGi="true" />

<!-- WebSocket 1.1 implementation JAR File -->
<jarIt jarfile="${tomcat-websocket.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-websocket"
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"/>
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"
addOSGi="true" />

<!-- Bootstrap JAR File -->
<jarIt jarfile="${bootstrap.jar}"
@@ -768,22 +821,26 @@
<!-- Tomcat-juli JAR File -->
<jarIt jarfile="${tomcat-juli.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-juli" />
filesId="files.tomcat-juli"
addOSGi="true" />

<!-- Catalina Main JAR File -->
<jarIt jarfile="${catalina.jar}"
filesDir="${tomcat.classes}"
filesId="files.catalina" />
filesId="files.catalina"
addOSGi="true" />

<!-- Catalina GroupCom/Tribes JAR File -->
<jarIt jarfile="${catalina-tribes.jar}"
filesDir="${tomcat.classes}"
filesId="files.catalina-tribes" />
filesId="files.catalina-tribes"
addOSGi="true" />

<!-- Catalina Cluster/HA JAR File -->
<jarIt jarfile="${catalina-ha.jar}"
filesDir="${tomcat.classes}"
filesId="files.catalina-ha" />
filesId="files.catalina-ha"
addOSGi="true" />

<!-- Catalina Ant Tasks JAR File -->
<jarIt jarfile="${catalina-ant.jar}"
@@ -793,47 +850,56 @@
<!-- Catalina Storeconfig JAR File -->
<jarIt jarfile="${catalina-storeconfig.jar}"
filesDir="${tomcat.classes}"
filesId="files.catalina-storeconfig" />
filesId="files.catalina-storeconfig"
addOSGi="true" />

<!-- Tomcat API JAR File -->
<jarIt jarfile="${tomcat-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-api" />
filesId="files.tomcat-api"
addOSGi="true" />

<!-- Tomcat Util JAR File -->
<jarIt jarfile="${tomcat-util.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-util" />
filesId="files.tomcat-util"
addOSGi="true" />

<!-- Tomcat Util Scan JAR File -->
<jarIt jarfile="${tomcat-util-scan.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-util-scan" />
filesId="files.tomcat-util-scan"
addOSGi="true" />

<!-- Protocol handlers - Coyote -->
<jarIt jarfile="${tomcat-coyote.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-coyote" />
filesId="files.tomcat-coyote"
addOSGi="true" />

<jarIt jarfile="${tomcat-jni.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-jni" />
filesId="files.tomcat-jni"
addOSGi="true" />

<!-- Jasper Implementation JAR File -->
<jarIt jarfile="${jasper.jar}"
filesDir="${tomcat.classes}"
filesId="files.jasper"
meta-inf="${tomcat.manifests}/jasper.jar"/>
meta-inf="${tomcat.manifests}/jasper.jar"
addOSGi="true" />

<!-- Jasper EL Implementation JAR File -->
<jarIt jarfile="${jasper-el.jar}"
filesDir="${tomcat.classes}"
filesId="files.jasper-el" />
filesId="files.jasper-el"
addOSGi="true" />

<!-- Re-packaged Apache Commons DBCP 2-->
<jarIt jarfile="${tomcat-dbcp.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-dbcp" />
filesId="files.tomcat-dbcp"
addOSGi="true" />

<!-- i18n JARs -->
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-es.jar"
@@ -1236,7 +1302,7 @@
</txt2html>
</target>
<target name="embed-jars" description="Create experimental embedded jars"
depends="build-manifests,compile" >
depends="build-manifests,build-bnd,compile" >

<mkdir dir="${tomcat.embed}" />

@@ -1254,18 +1320,22 @@
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-core"
notice="${tomcat.manifests}/servlet-api.jar.notice"
license="${tomcat.manifests}/servlet-api.jar.license"/>
license="${tomcat.manifests}/servlet-api.jar.license"
addOSGi="true" />
<jarIt jarfile="${tomcat-embed-jasper.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-jasper"
meta-inf="${tomcat.manifests}/jasper.jar"/>
meta-inf="${tomcat.manifests}/jasper.jar"
addOSGi="true" />
<jarIt jarfile="${tomcat-embed-el.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-el"/>
filesId="files.tomcat-embed-el"
addOSGi="true" />
<jarIt jarfile="${tomcat-embed-websocket.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-websocket"
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"/>
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"
addOSGi="true" />

</target>

@@ -1452,7 +1522,7 @@
errorproperty="test.result.error"
failureproperty="test.result.failure"
haltonfailure="${test.haltonfailure}"
threads="${test.threads}" >
threads="${test.threads}">

<jvmarg value="${test.jvmarg.egd}"/>
<jvmarg value="-Dfile.encoding=UTF-8"/>
@@ -1513,12 +1583,12 @@
</and>
</condition>
<condition property="cobertura.disabled" value="true">
<and>
<istrue value="${test.cobertura}"/>
<not>
<equals arg1="1" arg2="${test.threads}"/>
</not>
</and>
<and>
<istrue value="${test.cobertura}"/>
<not>
<equals arg1="1" arg2="${test.threads}"/>
</not>
</and>
</condition>
</target>

@@ -1793,9 +1863,9 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/servletapi"
version="true"
windowtitle="Servlet 3.1 API Documentation - Apache Tomcat ${version}"
doctitle="Servlet 3.1 API - Apache Tomcat ${version}"
header="&lt;b&gt;Servlet 3.1 - Apache Tomcat ${version}&lt;/b&gt;"
windowtitle="Servlet 4.0 API Documentation - Apache Tomcat ${version}"
doctitle="Servlet 4.0 API - Apache Tomcat ${version}"
header="&lt;b&gt;Servlet 4.0 - Apache Tomcat ${version}&lt;/b&gt;"
bottom="Copyright &amp;#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
@@ -1896,12 +1966,13 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<link href="../jspapi"/>
<link href="../elapi"/>
<link href="../websocketapi"/>
<link href="http://docs.oracle.com/javase/7/docs/api/"/>
<link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/>
<link href="http://docs.oracle.com/javaee/7/api/"/>
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
<link href="https://commons.apache.org/proper/commons-io/javadocs/api-release/"/>
<link href="https://javaee.github.io/javaee-spec/javadocs/"/>
<packageset dir="${tomcat.dist}/src/java/">
<include name="org/**"/>
<exclude name="org/apache/el/parser/**"/>
<exclude name="org/apache/tomcat/util/json/**"/>
</packageset>
<!--jdbc-pool src files for javadoc-->
<packageset dir="${tomcat.dist}/src/modules/jdbc-pool/src/main/java"/>
@@ -2456,13 +2527,13 @@ skip.installer property in build.properties" />

<mkdir dir="${tomcat.src.jars}" />

<!-- Common Annotations 1.2 JAR File -->
<!-- Common Annotations 1.3 JAR File -->
<jarIt jarfile="${annotations-api-src.jar}"
filesDir="java"
filesId="files.annotations-api"
manifest="${tomcat.manifests}/annotations-api.jar.manifest" />

<!-- Servlet 3.1 Implementation JAR File -->
<!-- Servlet 4.0 Implementation JAR File -->
<jarIt jarfile="${servlet-api-src.jar}"
filesDir="java"
filesId="files.servlet-api"
@@ -2557,9 +2628,7 @@ skip.installer property in build.properties" />
<!-- Protocol handlers - Coyote -->
<jarIt jarfile="${tomcat-coyote-src.jar}"
filesDir="java"
filesId="files.tomcat-coyote"
notice="${tomcat.manifests}/tomcat-coyote.jar.notice"
license="${tomcat.manifests}/tomcat-coyote.license" />
filesId="files.tomcat-coyote" />

<!-- JNI -->
<jarIt jarfile="${tomcat-jni-src.jar}"
@@ -2641,7 +2710,17 @@ skip.installer property in build.properties" />
<param name="checksum.value" value="${jdt.checksum.value}"/>
</antcall>

</target>
<!-- Download SAAJ API -->
<antcall target="downloadfile">
<param name="sourcefile" value="${saaj-api.loc}"/>
<param name="destfile" value="${saaj-api.jar}"/>
<param name="destdir" value="${saaj-api.home}"/>
<param name="checksum.enabled" value="${saaj-api.checksum.enabled}"/>
<param name="checksum.algorithm" value="${saaj-api.checksum.algorithm}"/>
<param name="checksum.value" value="${saaj-api.checksum.value}"/>
</antcall>

</target>

<target name="download-test-compile"
description="Download additional components for the tests" >
@@ -3124,6 +3203,38 @@ Read the Building page on the Apache Tomcat documentation site for details on ho

<!-- ======================= Macros, Taskdefs etc ======================== -->

<target name="download-bnd" >
<!-- Download bnd -->
<antcall target="downloadfile">
<param name="sourcefile" value="${bnd.loc}"/>
<param name="destfile" value="${bnd.jar}"/>
<param name="destdir" value="${bnd.home}"/>
<param name="checksum.enabled" value="${bnd.checksum.enabled}"/>
<param name="checksum.algorithm" value="${bnd.checksum.algorithm}"/>
<param name="checksum.value" value="${bnd.checksum.value}"/>
</antcall>

<!-- Download bndlib -->
<antcall target="downloadfile">
<param name="sourcefile" value="${bndlib.loc}"/>
<param name="destfile" value="${bndlib.jar}"/>
<param name="destdir" value="${bndlib.home}"/>
<param name="checksum.enabled" value="${bndlib.checksum.enabled}"/>
<param name="checksum.algorithm" value="${bndlib.checksum.algorithm}"/>
<param name="checksum.value" value="${bndlib.checksum.value}"/>
</antcall>
</target>

<target name="setup-bnd" depends="download-bnd">
<!-- Add bnd tasks to project -->
<path id="bndlib.classpath">
<fileset file="${bnd.jar}" />
<fileset file="${bndlib.jar}" />
</path>

<taskdef resource="aQute/bnd/ant/taskdef.properties" classpathref="bndlib.classpath" />
</target>

<macrodef name="jarIt" description="utility macro for standard JAR packaging">
<attribute name="jarfile"
description="the name of the JAR file to create"/>
@@ -3139,6 +3250,8 @@ Read the Building page on the Apache Tomcat documentation site for details on ho
default="${tomcat.manifests}/default.license" />
<attribute name="meta-inf" description="additional contents for META-INF"
default="${tomcat.manifests}/default" />
<attribute name="addOSGi" description="generate OSGi metadata"
default="false" />
<sequential>
<jar jarfile="@{jarfile}" manifest="@{manifest}">
<fileset dir="@{filesDir}">
@@ -3152,9 +3265,22 @@ Read the Building page on the Apache Tomcat documentation site for details on ho
<zipfileset file="@{notice}" fullpath="META-INF/NOTICE" />
<zipfileset file="@{license}" fullpath="META-INF/LICENSE" />
</jar>
<antcall target="add-osgi" >
<param name="jarfile" value="@{jarfile}" />
<param name="addOSGi" value="@{addOSGi}" />
</antcall>
</sequential>
</macrodef>

<target name="add-osgi" if="${addOSGi}" >
<echo message="add-osgi ${jarfile} ${addOSGi}"></echo>
<bndwrap output="${jarfile}.bnd" definitions="${tomcat.bnd}" >
<fileset file="${jarfile}" />
</bndwrap>
<delete file="${jarfile}" />
<move file="${jarfile}.bnd" tofile="${jarfile}" />
</target>

<!-- Macro, used to create checksum and signature files -->
<!-- Requires 'file' as a parameter. -->
<macrodef name="hashAndSign">


+ 0
- 12
conf/catalina.policy View File

@@ -172,21 +172,9 @@ grant {
permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.jasper.runtime.*";

// The cookie code needs these.
permission java.util.PropertyPermission
"org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read";
permission java.util.PropertyPermission
"org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read";
permission java.util.PropertyPermission
"org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read";

// Applications using WebSocket need to be able to access these packages
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server";

// Applications need to access these packages to use the Servlet 4.0 Preview
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.servlet4preview";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.servlet4preview.http";
};




+ 0
- 7
conf/catalina.properties View File

@@ -209,10 +209,3 @@ tomcat.util.buf.StringCache.byte.enabled=true
#tomcat.util.buf.StringCache.char.enabled=true
#tomcat.util.buf.StringCache.trainThreshold=500000
#tomcat.util.buf.StringCache.cacheSize=5000

# This system property is deprecated. Use the relaxedPathChars relaxedQueryChars
# attributes of the Connector instead. These attributes permit a wider range of
# characters to be configured as valid.
# Allow for changes to HTTP request validation
# WARNING: Using this option may expose the server to CVE-2016-6816
#tomcat.util.http.parser.HttpParser.requestTargetAllow=|

+ 1
- 0
conf/context.xml View File

@@ -21,6 +21,7 @@
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

<!-- Uncomment this to disable session persistence across Tomcat restarts -->


+ 4
- 0
conf/logging.properties View File

@@ -25,18 +25,22 @@ handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.jul
1catalina.org.apache.juli.AsyncFileHandler.level = FINE
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
1catalina.org.apache.juli.AsyncFileHandler.maxDays = 90

2localhost.org.apache.juli.AsyncFileHandler.level = FINE
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.
2localhost.org.apache.juli.AsyncFileHandler.maxDays = 90

3manager.org.apache.juli.AsyncFileHandler.level = FINE
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.
3manager.org.apache.juli.AsyncFileHandler.maxDays = 90

4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.
4host-manager.org.apache.juli.AsyncFileHandler.maxDays = 90

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter


+ 17
- 6
conf/web.xml View File

@@ -18,8 +18,8 @@
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">

<!-- ======================== Introduction ============================== -->
<!-- This document defines default values for *all* web applications -->
@@ -48,6 +48,11 @@
<!-- fileEncoding Encoding to be used to read static resources -->
<!-- [platform default] -->
<!-- -->
<!-- useBomIfPresent If a static file contains a byte order mark -->
<!-- (BOM), should this be used to determine the -->
<!-- file encoding in preference to fileEncoding. -->
<!-- [true] -->
<!-- -->
<!-- input Input buffer size (in bytes) when reading -->
<!-- resources to be served. [2048] -->
<!-- -->
@@ -138,9 +143,9 @@
<!-- pages. See the jasper documentation for more -->
<!-- information. -->
<!-- -->
<!-- compilerSourceVM Compiler source VM. [1.7] -->
<!-- compilerSourceVM Compiler source VM. [1.8] -->
<!-- -->
<!-- compilerTargetVM Compiler target VM. [1.7] -->
<!-- compilerTargetVM Compiler target VM. [1.8] -->
<!-- -->
<!-- development Is Jasper used in development mode? If true, -->
<!-- the frequency at which JSPs are checked for -->
@@ -233,7 +238,13 @@
<!-- debugging be suppressed? [false] -->
<!-- -->
<!-- trimSpaces Should template text that consists entirely of -->
<!-- whitespace be removed from the output? [false] -->
<!-- whitespace be removed from the output (true), -->
<!-- replaced with a single space (single) or left -->
<!-- unchanged (false)? Note that if a JSP page or -->
<!-- tag file specifies a trimDirectiveWhitespaces -->
<!-- value of true, that will take precedence over -->
<!-- this configuration setting for that page/tag. -->
<!-- [false] -->
<!-- -->
<!-- xpoweredBy Determines whether X-Powered-By response -->
<!-- header is added by generated servlet. [false] -->
@@ -338,7 +349,7 @@
<!-- enableCmdLineArguments -->
<!-- Are command line parameters generated from -->
<!-- the query string as per section 4.4 of 3875 -->
<!-- RFC? [true] -->
<!-- RFC? [false] -->
<!-- -->
<!-- executable Name of the executable used to run the -->
<!-- script. [perl] -->


+ 1
- 1
java/javax/el/ArrayELResolver.java View File

@@ -138,7 +138,7 @@ public class ArrayELResolver extends ELResolver {
return ((Character) property).charValue();
}
if (property instanceof Boolean) {
return (((Boolean) property).booleanValue() ? 1 : 0);
return ((Boolean) property).booleanValue() ? 1 : 0;
}
if (property instanceof String) {
return Integer.parseInt((String) property);


+ 6
- 9
java/javax/el/ExpressionFactory.java View File

@@ -34,7 +34,6 @@ import java.security.PrivilegedAction;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -56,8 +55,7 @@ public abstract class ExpressionFactory {
private static final String PROPERTY_FILE;

private static final CacheValue nullTcclFactory = new CacheValue();
private static final ConcurrentMap<CacheKey, CacheValue> factoryCache =
new ConcurrentHashMap<>();
private static final Map<CacheKey, CacheValue> factoryCache = new ConcurrentHashMap<>();

static {
if (IS_SECURITY_ENABLED) {
@@ -177,17 +175,16 @@ public abstract class ExpressionFactory {
(ExpressionFactory) constructor.newInstance(properties);
}

} catch (InstantiationException | IllegalAccessException | IllegalArgumentException |
NoSuchMethodException e) {
throw new ELException(
"Unable to create ExpressionFactory of type: " + clazz.getName(),
e);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
Util.handleThrowable(cause);
throw new ELException(
"Unable to create ExpressionFactory of type: " + clazz.getName(),
e);
} catch (ReflectiveOperationException | IllegalArgumentException e) {
throw new ELException(
"Unable to create ExpressionFactory of type: " + clazz.getName(),
e);
}

return result;
@@ -326,7 +323,7 @@ public abstract class ExpressionFactory {
}

public void setFactoryClass(Class<?> clazz) {
ref = new WeakReference<Class<?>>(clazz);
ref = new WeakReference<>(clazz);
}
}



+ 4
- 3
java/javax/el/ImportHandler.java View File

@@ -267,7 +267,7 @@ public class ImportHandler {
}

private Map<String,Set<String>> packageNames = new ConcurrentHashMap<>();
private ConcurrentHashMap<String,String> classNames = new ConcurrentHashMap<>();
private Map<String,String> classNames = new ConcurrentHashMap<>();
private Map<String,Class<?>> clazzes = new ConcurrentHashMap<>();
private Map<String,Class<?>> statics = new ConcurrentHashMap<>();

@@ -366,9 +366,10 @@ public class ImportHandler {
// c) such check is not required by specification.
Set<String> preloaded = standardPackages.get(name);
if (preloaded == null) {
preloaded = Collections.emptySet();
packageNames.put(name, Collections.emptySet());
} else {
packageNames.put(name, preloaded);
}
packageNames.put(name, preloaded);
}




+ 1
- 1
java/javax/el/ListELResolver.java View File

@@ -144,7 +144,7 @@ public class ListELResolver extends ELResolver {
return ((Character) property).charValue();
}
if (property instanceof Boolean) {
return (((Boolean) property).booleanValue() ? 1 : 0);
return ((Boolean) property).booleanValue() ? 1 : 0;
}
if (property instanceof String) {
return Integer.parseInt((String) property);


+ 1
- 1
java/javax/el/LocalStrings_es.properties View File

@@ -18,4 +18,4 @@ propertyNotReadable = Propiedad [{1}] no legible para el tipo [{0}]
propertyNotWritable = Propiedad [{1}] no grabable para el tipo [{0}]
propertyReadError = Error reading [{1}] en el tipo [{0}]
propertyWriteError = Error writing [{1}] en el tipo [{0}]
objectNotAssignable = No puedo a\u00F1adir un objeto del tipo [{0}] a un arreglo de objetos del tipo [{1}]
objectNotAssignable = No puedo añadir un objeto del tipo [{0}] a un arreglo de objetos del tipo [{1}]

+ 4
- 5
java/javax/el/StaticFieldELResolver.java View File

@@ -47,8 +47,8 @@ public class StaticFieldELResolver extends ELResolver {
Modifier.isPublic(modifiers)) {
return field.get(null);
}
} catch (IllegalArgumentException | IllegalAccessException
| NoSuchFieldException | SecurityException e) {
} catch (IllegalArgumentException | IllegalAccessException |
NoSuchFieldException | SecurityException e) {
exception = e;
}
String msg = Util.message(context, "staticFieldELResolver.notFound",
@@ -101,13 +101,12 @@ public class StaticFieldELResolver extends ELResolver {

try {
result = match.newInstance(parameters);
} catch (IllegalArgumentException | IllegalAccessException |
InstantiationException e) {
throw new ELException(e);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
Util.handleThrowable(cause);
throw new ELException(cause);
} catch (ReflectiveOperationException e) {
throw new ELException(e);
}
return result;



+ 21
- 3
java/javax/el/Util.java View File

@@ -33,7 +33,6 @@ import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -85,8 +84,7 @@ class Util {


private static final CacheValue nullTcclFactory = new CacheValue();
private static final ConcurrentMap<CacheKey, CacheValue> factoryCache =
new ConcurrentHashMap<>();
private static final Map<CacheKey, CacheValue> factoryCache = new ConcurrentHashMap<>();

/**
* Provides a per class loader cache of ExpressionFactory instances without
@@ -809,6 +807,26 @@ class Util {
}
return cmp;
}

@Override
public boolean equals(Object o)
{
return o == this || (null != o &&
this.getClass().equals(o.getClass()) &&
((MatchResult)o).getExact() == this.getExact() &&
((MatchResult)o).getAssignable() == this.getAssignable() &&
((MatchResult)o).getCoercible() == this.getCoercible() &&
((MatchResult)o).isBridge() == this.isBridge());
}

@Override
public int hashCode()
{
return (this.isBridge() ? 1 << 24 : 0) ^
this.getExact() << 16 ^
this.getAssignable() << 8 ^
this.getCoercible();
}
}




+ 2
- 4
java/javax/security/auth/message/config/AuthConfigFactory.java View File

@@ -16,7 +16,6 @@
*/
package javax.security.auth.message.config;

import java.lang.reflect.InvocationTargetException;
import java.security.AccessController;
import java.security.Permission;
import java.security.PrivilegedAction;
@@ -67,9 +66,8 @@ public abstract class AuthConfigFactory {
factory = AccessController.doPrivileged(
new PrivilegedExceptionAction<AuthConfigFactory>() {
@Override
public AuthConfigFactory run() throws ClassNotFoundException,
InstantiationException, IllegalAccessException, IllegalArgumentException,
InvocationTargetException, NoSuchMethodException, SecurityException {
public AuthConfigFactory run() throws ReflectiveOperationException,
IllegalArgumentException, SecurityException {
// Load this class with the same class loader as used for
// this class. Note that the Thread context class loader
// should not be used since that would trigger a memory leak


+ 2
- 0
java/javax/servlet/AsyncContext.java View File

@@ -25,6 +25,8 @@ public interface AsyncContext {
"javax.servlet.async.request_uri";
public static final String ASYNC_CONTEXT_PATH =
"javax.servlet.async.context_path";
public static final String ASYNC_MAPPING =
"javax.servlet.async.mapping";
public static final String ASYNC_PATH_INFO =
"javax.servlet.async.path_info";
public static final String ASYNC_SERVLET_PATH =


+ 5
- 3
java/javax/servlet/Filter.java View File

@@ -58,13 +58,14 @@ public interface Filter {
* <li>Does not return within a time period defined by the web
* container</li>
* </ul>
* The default implementation is a NO-OP.
*
* @param filterConfig The configuration information associated with the
* filter instance being initialised
*
* @throws ServletException if the initialisation fails
*/
public void init(FilterConfig filterConfig) throws ServletException;
public default void init(FilterConfig filterConfig) throws ServletException {}

/**
* The <code>doFilter</code> method of the Filter is called by the container
@@ -112,7 +113,8 @@ public interface Filter {
* that are being held (for example, memory, file handles, threads) and make
* sure that any persistent state is synchronized with the filter's current
* state in memory.