Skip to content
Commits on Source (8)
......@@ -84,7 +84,7 @@ Download Page. There is one such page for every major Tomcat version:
If you have chosen to attach a patch to the Bugzilla issue (or email
one), then you'll need to download the sources as noted above, make your
desired changes and then manually generate your patch using diff (other
desired changes and then manually generate your patch using diff (or any
other tool).
##### GitHub
......
......@@ -38,7 +38,7 @@ CONTENTS:
===================
Dependency Changes:
===================
Tomcat @VERSION_MAJOR_MINOR@ is designed to run on Java SE 8 and later.
Tomcat @VERSION_MAJOR_MINOR@ is designed to run on Java @MIN_JAVA_VERSION@ and later.
==============
......
......@@ -157,7 +157,7 @@ create the following script file:
On Windows, %CATALINA_BASE%\bin\setenv.bat:
set "JRE_HOME=%ProgramFiles%\Java\jre8"
set "JRE_HOME=%ProgramFiles%\Java\jre@MIN_JAVA_VERSION@"
exit /b 0
On *nix, $CATALINA_BASE/bin/setenv.sh:
......
......@@ -17,6 +17,9 @@ rem limitations under the License.
rem ---------------------------------------------------------------------------
rem Start/Stop Script for the CATALINA Server
rem
rem For supported commands call "catalina.bat help" or see the usage section
rem towards the end of this file.
rem
rem Environment Variable Prerequisites
rem
rem Do not set the variables in this script. Instead put them into a script
......@@ -28,9 +31,8 @@ rem script will have no effect at all on Windows Services. As such, any
rem local customizations made in a CATALINA_BASE/bin/setenv.bat script
rem will also have no effect on Tomcat when launched as a Windows Service.
rem The configuration that controls Windows Services is stored in the Windows
rem Registry, and is most conveniently maintained using the "tomcatXw.exe"
rem maintenance utility, where "X" is the major version of Tomcat you are
rem running.
rem Registry, and is most conveniently maintained using the "tomcat@VERSION_MAJOR@w.exe"
rem maintenance utility.
rem
rem CATALINA_HOME May point at your Catalina "build" directory.
rem
......@@ -204,7 +206,7 @@ set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
:juliClasspathDone
if not "%JSSE_OPTS%" == "" goto gotJsseOpts
set JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048"
set "JSSE_OPTS=-Djdk.tls.ephemeralDHKeySize=2048"
:gotJsseOpts
set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"
......
......@@ -18,6 +18,9 @@
# -----------------------------------------------------------------------------
# Control Script for the CATALINA Server
#
# For supported commands call "catalina.sh help" or see the usage section at
# the end of this file.
#
# Environment Variable Prerequisites
#
# Do not set the variables in this script. Instead put them into a script
......
......@@ -210,7 +210,7 @@ if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" (
"%EXECUTABLE%" //IS//%SERVICE_NAME% ^
--Description "Apache Tomcat @VERSION@ Server - https://tomcat.apache.org/" ^
--DisplayName "%DISPLAYNAME%" ^
--DisplayName "Apache Tomcat @VERSION_MAJOR_MINOR@ %SERVICE_NAME%" ^
--Install "%EXECUTABLE%" ^
--LogPath "%CATALINA_BASE%\logs" ^
--StdOutput auto ^
......
......@@ -25,10 +25,13 @@
# ----- Version Control Flags -----
version.major=9
version.minor=0
version.build=24
version.build=27
version.patch=0
version.suffix=
# ----- Source control flags -----
git.branch=master
# ----- Build control flags -----
# Note enabling validation uses Checkstyle which is LGPL licensed
ant.version.required=1.9.8
......@@ -126,15 +129,15 @@ wsdl4j-lib.loc=${base-maven.loc}/wsdl4j/wsdl4j/${wsdl4j-lib.version}/wsdl4j-${ws
# ----- Eclipse JDT, version 4.7 or later -----#
# See https://cwiki.apache.org/confluence/display/TOMCAT/Managing+Tomcat%27s+Dependency+on+the+Eclipse+JDT+Core+Batch+Compiler
#
# Checksum is from "SHA512 Checksums for 4.10" link at
# http://download.eclipse.org/eclipse/downloads/drops4/R-4.10-201812060815/
# http://download.eclipse.org/eclipse/downloads/drops4/R-4.10-201812060815/checksum/eclipse-4.10-SUMSSHA512
# Checksum is from "SHA512 Checksums for 4.13" link at
# http://download.eclipse.org/eclipse/downloads/drops4/R-4.13-201909161045/
# http://download.eclipse.org/eclipse/downloads/drops4/R-4.13-201909161045/checksum/eclipse-4.13-SUMSSHA512
#
jdt.version=4.12
jdt.release=R-4.12-201906051800/
jdt.version=4.13
jdt.release=R-4.13-201909161045/
jdt.checksum.enabled=true
jdt.checksum.algorithm=SHA-512
jdt.checksum.value=7d38921ae374a5112e7ed5596d85955b608ddf74849373d7a74b199961514807e749d8c8cad89871fa1fdd5e14bc6ec471665546a9f8d313da5c963589c307b0
jdt.checksum.value=d608e4b7fc9b061e327ad5c39112c032e310a48c57ddd01c9349f2be8f5ce4d3d0c3862b6b5cc105220a06a6dd62c477de654b9fbe6f4c8a3d3de816e5de19f7
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.
......@@ -172,20 +175,20 @@ nsis.nsdialogs.dll=${nsis.home}/Plugins/${nsis.arch.dir}nsDialogs.dll
nsis.loc=${base-sf.loc}/nsis/nsis-${nsis.version}.zip
# ----- Commons Daemon, version 1.2.0 or later -----
commons-daemon.version=1.2.0
commons-daemon.version=1.2.2
# checksum for commons-daemon-1.2.0-bin.tar.gz
# checksum for commons-daemon-1.2.1-bin.tar.gz
commons-daemon.bin.checksum.enabled=true
commons-daemon.bin.checksum.algorithm=SHA-512
commons-daemon.bin.checksum.value=81fbbd1115d735232bbcc426d958bd8fe149c97bfe96df1549a19332afd4954f3f75c3a693f214bfef065931a1d79c528dfb2cefb1bb3628d211e1761814c23b
commons-daemon.bin.checksum.value=f9fb917aaf398f61c42796eb4168664e076f81bc3fae82790eb39c723f03a1e7cbc2304161938d8d8993b7fbb718214b94740dbf9679f6ef93e85b5a2e861761
# checksums for commons-daemon-1.1.0-native-src.tar.gz, commons-daemon-1.2.0-bin-windows.zip
# checksums for commons-daemon-1.2.1-native-src.tar.gz, commons-daemon-1.2.1-bin-windows.zip
commons-daemon.native.src.checksum.enabled=true
commons-daemon.native.src.checksum.algorithm=SHA-512
commons-daemon.native.src.checksum.value=c37f506b129b8a0efface6745dcc6d0d9d3e2663d28eca0df9903301f0b9b65fd8306e361935887fb459daf0a29da6fa63ea60f742ce4e497dc53a2a2d86db12
commons-daemon.native.src.checksum.value=45ad856a8a6b024e80905cfac5a741a57ab86479ecd65adab9641f5444d3a2362bb13d1ea38ec3db5eb89d30c29f2f6d3b0e48cbf2f60c081c4df2451acd1ab4
commons-daemon.native.win.checksum.enabled=true
commons-daemon.native.win.checksum.algorithm=SHA-512
commons-daemon.native.win.checksum.value=8b6e0bb4172861338e0cb3238f6da715c3cef04a88e8bfab0cbb487ef638aa69fd34de9407b0b2ed54451fbbcbff8a999324289052a581a5d07d6f6ff84a83b6
commons-daemon.native.win.checksum.value=16e7a6fc5bc83ada3bcf9e10cc69ef21400dc019d1f2be00caec0bce72c3bc5a7c72116878e12b4851a15bb473c0948a9c14e1a86b6addcefa6c20638dbcc88c
commons-daemon.home=${base.path}/commons-daemon-${commons-daemon.version}
commons-daemon.jar=${commons-daemon.home}/commons-daemon-${commons-daemon.version}.jar
......@@ -287,7 +290,7 @@ saaj-api.loc=${base-maven.loc}/javax/xml/soap/saaj-api/${saaj-api.version}/saaj-
# ----- provides OSGI metadata for JARs -----
bnd.version=4.2.0
# checksums for biz.aQute.bnd-4.0.0.jar, biz.aQute.bndlib-4.0.0.jar
# checksums for biz.aQute.bnd-4.2.0.jar, biz.aQute.bndlib-4.2.0.jar
bnd.checksum.enabled=true
bnd.checksum.algorithm=MD5|SHA-1
bnd.checksum.value=ca26a671ea67bf75d83b1588bdd68923|d4bc96b2619f95e596bbf3f725f3b077e96c5d43
......
......@@ -90,10 +90,11 @@
<!-- build output directory for jdbc-pool -->
<property name="tomcat.pool" value="${tomcat.output}/jdbc-pool"/>
<!-- Servlet 4.0 spec requires 1.8+ -->
<property name="compile.source" value="1.8"/>
<property name="compile.target" value="1.8"/>
<!-- Servlet 4.0 spec requires Java 8+ -->
<property name="compile.source" value="8"/>
<property name="compile.target" value="8"/>
<property name="compile.release" value="8"/>
<property name="min.java.version" value="8"/>
<!-- Locations to create the JAR artifacts -->
<!-- Standard JARs -->
......@@ -196,9 +197,9 @@
<!-- Java 9 -->
<available classname="java.lang.reflect.InaccessibleObjectException"
property="java9.add.modules"
value="--add-modules java.xml.ws"/>
<property name="java9.add.modules" value=""/>
property="java9.javadoc.options"
value="-html5"/>
<property name="java9.javadoc.options" value=""/>
<!-- Classpaths -->
<path id="compile.classpath">
......@@ -239,6 +240,8 @@
<filter token="VERSION_MAJOR_MINOR" value="${version.major.minor}"/>
<filter token="VERSION_BUILT" value="${today} ${tstamp} UTC"/>
<filter token="JDT_VERSION" value="${jdt.version}"/>
<filter token="GIT_BRANCH" value="${git.branch}"/>
<filter token="MIN_JAVA_VERSION" value="${min.java.version}"/>
</filterset>
<!-- Files to change line endings for depending on target platform -->
......@@ -595,8 +598,9 @@
<fileset dir="modules/jdbc-pool" >
<exclude name=".*/**"/>
<exclude name="**/MANIFEST.MF"/>
<exclude name="build.properties" />
<patternset refid="text.files" />
<!-- Exclude developer specific local files -->
<exclude name="build.properties" />
</fileset>
</checkstyle>
<!-- javax package checks -->
......@@ -1840,6 +1844,27 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<target name="javadoc" depends="dist-source"
description="Create the Tomcat javadoc" >
<javadoc packagenames="javax.annotation.*"
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/annotationapi"
version="true"
windowtitle="Common Annotations 1.3 API Documentation - Apache Tomcat ${version}"
doctitle="Common Annotations 1.3 API - Apache Tomcat ${version}"
header="&lt;b&gt;Common Annotations 1.3 - Apache Tomcat ${version}&lt;/b&gt;"
bottom="Copyright &amp;#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
<javadoc packagenames="javax.servlet.*"
excludepackagenames="javax.servlet.jsp.*"
sourcepath="${tomcat.dist}/src/java"
......@@ -1852,7 +1877,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
......@@ -1872,7 +1898,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
......@@ -1892,7 +1919,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
......@@ -1912,6 +1940,27 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
<classpath>
<path refid="compile.classpath"/>
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
<javadoc packagenames="javax.security.auth.message.*"
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/jaspicapi"
version="true"
windowtitle="JASPIC 1.1 API Documentation - Apache Tomcat ${version}"
doctitle="JASPIC 1.1 API - Apache Tomcat ${version}"
header="&lt;b&gt;JASPIC 1.1 - Apache Tomcat ${version}&lt;/b&gt;"
bottom="Copyright &amp;#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp"
maxmemory="512m"
failonerror="true"
......@@ -1931,7 +1980,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
encoding="UTF-8"
docencoding="UTF-8"
charset="UTF-8"
additionalparam="-breakiterator -notimestamp ${java9.add.modules}"
additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}"
source="${compile.source}"
maxmemory="512m"
failonerror="true"
failonwarning="true">
......@@ -1939,12 +1989,13 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<path refid="compile.classpath"/>
<path location="${ant.core.lib}"/>
</classpath>
<link href="../annotationapi"/>
<link href="../servletapi"/>
<link href="../jspapi"/>
<link href="../elapi"/>
<link href="../websocketapi"/>
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
<link href="https://commons.apache.org/proper/commons-io/javadocs/api-release/"/>
<link href="../jaspicapi"/>
<link href="https://docs.oracle.com/javase/8/docs/api/"/>
<link href="https://javaee.github.io/javaee-spec/javadocs/"/>
<packageset dir="${tomcat.dist}/src/java/">
<include name="org/**"/>
......
......@@ -76,7 +76,7 @@
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
This connector uses the NIO implementation. The default
SSLImplementation will depend on the presence of the APR/native
library and the useOpenSSL attribute of the
......@@ -93,7 +93,7 @@
</SSLHostConfig>
</Connector>
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the APR/native implementation which always uses
OpenSSL for TLS.
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
......
tomcat9 (9.0.27-1) unstable; urgency=medium
* New upstream release
- Refreshed the patches
* Standards-Version updated to 4.4.1
-- Emmanuel Bourg <ebourg@apache.org> Mon, 14 Oct 2019 11:31:50 +0200
tomcat9 (9.0.24-1) unstable; urgency=medium
* New upstream release
......
......@@ -24,7 +24,7 @@ Build-Depends:
libwsdl4j-java,
lsb-release,
maven-repo-helper
Standards-Version: 4.4.0
Standards-Version: 4.4.1
Vcs-Git: https://salsa.debian.org/java-team/tomcat9.git
Vcs-Browser: https://salsa.debian.org/java-team/tomcat9
Homepage: http://tomcat.apache.org
......
......@@ -3,7 +3,7 @@ Date: Mon, 28 Jun 2010 21:32:35 +0200
Subject: [PATCH] split deploy-webapps target from deploy target
--- a/build.xml
+++ b/build.xml
@@ -1120,7 +1120,7 @@
@@ -1124,7 +1124,7 @@
</xslt>
</target>
......@@ -12,7 +12,7 @@ Subject: [PATCH] split deploy-webapps target from deploy target
description="Default. Builds a working Tomcat instance">
<copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
@@ -1154,6 +1154,10 @@
@@ -1158,6 +1158,10 @@
</fileset>
</copy>
......
......@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/build.xml
+++ b/build.xml
@@ -1514,8 +1514,10 @@
@@ -1518,8 +1518,10 @@
</filterchain>
</concat>
......
......@@ -9,7 +9,7 @@ Bug-Debian: http://bugs.debian.org/585379
Forwarded: not-needed
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -356,7 +356,7 @@
@@ -359,7 +359,7 @@
-classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \
-Djava.security.manager \
......@@ -18,7 +18,7 @@ Forwarded: not-needed
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
@@ -385,7 +385,7 @@
@@ -388,7 +388,7 @@
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
......@@ -27,7 +27,7 @@ Forwarded: not-needed
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -453,7 +453,7 @@
@@ -456,7 +456,7 @@
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
......
......@@ -5,7 +5,7 @@ Last-Update: 2011-05-16
--- a/build.xml
+++ b/build.xml
@@ -672,7 +672,7 @@
@@ -676,7 +676,7 @@
</copy>
</target>
......@@ -14,7 +14,7 @@ Last-Update: 2011-05-16
<!-- Compile internal server components -->
<javac srcdir="java" destdir="${tomcat.classes}"
debug="${compile.debug}"
@@ -1122,9 +1122,9 @@
@@ -1126,9 +1126,9 @@
<target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples,deploy-webapps"
description="Default. Builds a working Tomcat instance">
......
......@@ -5,7 +5,7 @@ Author: Jakub Adam <jakub.adam@ktknet.cz>
Forwarded: not-needed
--- a/build.xml
+++ b/build.xml
@@ -520,7 +520,6 @@
@@ -523,7 +523,6 @@
<!-- Property that determines if manifests need updating -->
<uptodate property="manifests.uptodate"
targetfile="${tomcat.manifests}/default.manifest" >
......@@ -13,7 +13,7 @@ Forwarded: not-needed
<srcfiles file="${basedir}/build.properties" />
<srcfiles file="${basedir}/build.properties.default" />
<srcfiles file="${basedir}/build.xml" />
@@ -534,7 +533,6 @@
@@ -537,7 +536,6 @@
<!-- Property that determines if OSGI bnd files need updating -->
<uptodate property="bnd.uptodate"
targetfile="${tomcat.bnd}/annotations-api.bnd" >
......
......@@ -16,7 +16,7 @@ Bug-Debian: http://bugs.debian.org/729840
\ No newline at end of file
--- a/build.xml
+++ b/build.xml
@@ -235,6 +235,7 @@
@@ -236,6 +236,7 @@
<filter token="YEAR" value="${year}"/>
<filter token="VERSION" value="${version}"/>
<filter token="VERSION_NUMBER" value="${version.number}"/>
......
......@@ -34,6 +34,8 @@ public @interface Resource {
public String name() default "";
/**
* Uses generics since Common Annotations 1.2.
*
* @return The type for instances of this resource
*/
public Class<?> type() default Object.class;
public AuthenticationType authenticationType() default AuthenticationType.CONTAINER;
......@@ -42,6 +44,8 @@ public @interface Resource {
public String mappedName() default "";
/**
* @since Common Annotations 1.1
*
* @return The name of the entry, if any, to use for this resource
*/
public String lookup() default "";
}
......@@ -89,7 +89,7 @@ public class BeanELResolver extends ELResolver {
}
context.setPropertyResolved(base, property);
Method m = this.property(context, base, property).read(context);
Method m = this.property(context, base, property).read(context, base);
try {
return m.invoke(base, (Object[]) null);
} catch (InvocationTargetException e) {
......@@ -117,7 +117,7 @@ public class BeanELResolver extends ELResolver {
"resolverNotWriteable", base.getClass().getName()));
}
Method m = this.property(context, base, property).write(context);
Method m = this.property(context, base, property).write(context, base);
try {
m.invoke(base, value);
} catch (InvocationTargetException e) {
......@@ -147,7 +147,7 @@ public class BeanELResolver extends ELResolver {
// Find the matching method
Method matchingMethod =
Util.findMethod(base.getClass(), methodName, paramTypes, params);
Util.findMethod(base.getClass(), base, methodName, paramTypes, params);
Object[] parameters = Util.buildParameters(
matchingMethod.getParameterTypes(), matchingMethod.isVarArgs(),
......@@ -176,7 +176,7 @@ public class BeanELResolver extends ELResolver {
}
context.setPropertyResolved(base, property);
return this.readOnly || this.property(context, base, property).isReadOnly();
return this.readOnly || this.property(context, base, property).isReadOnly(base);
}
@Override
......@@ -263,10 +263,6 @@ public class BeanELResolver extends ELResolver {
return property;
}
public BeanProperty getBeanProperty(String name) {
return get(null, name);
}
private Class<?> getType() {
return type;
}
......@@ -289,28 +285,18 @@ public class BeanELResolver extends ELResolver {
this.type = descriptor.getPropertyType();
}
// Can't use Class<?> because API needs to match specification
@SuppressWarnings("rawtypes")
public Class getPropertyType() {
public Class<?> getPropertyType() {
return this.type;
}
public boolean isReadOnly() {
public boolean isReadOnly(Object base) {
return this.write == null &&
(null == (this.write = Util.getMethod(this.owner, descriptor.getWriteMethod())));
}
public Method getWriteMethod() {
return write(null);
}
public Method getReadMethod() {
return this.read(null);
(null == (this.write = Util.getMethod(this.owner, base, descriptor.getWriteMethod())));
}
private Method write(ELContext ctx) {
private Method write(ELContext ctx, Object base) {
if (this.write == null) {
this.write = Util.getMethod(this.owner, descriptor.getWriteMethod());
this.write = Util.getMethod(this.owner, base, descriptor.getWriteMethod());
if (this.write == null) {
throw new PropertyNotWritableException(Util.message(ctx,
"propertyNotWritable", new Object[] {
......@@ -320,9 +306,9 @@ public class BeanELResolver extends ELResolver {
return this.write;
}
private Method read(ELContext ctx) {
private Method read(ELContext ctx, Object base) {
if (this.read == null) {
this.read = Util.getMethod(this.owner, descriptor.getReadMethod());
this.read = Util.getMethod(this.owner, base, descriptor.getReadMethod());
if (this.read == null) {
throw new PropertyNotFoundException(Util.message(ctx,
"propertyNotReadable", new Object[] {
......
......@@ -109,11 +109,17 @@ public class ELProcessor {
function = sig.getName();
}
// Only returns public methods. Java 9+ access is checked below.
Method methods[] = clazz.getMethods();
JreCompat jreCompat = JreCompat.getInstance();
for (Method method : methods) {
if (!Modifier.isStatic(method.getModifiers())) {
continue;
}
if (!jreCompat.canAcccess(null, method)) {
continue;
}
if (method.getName().equals(sig.getName())) {
if (sig.getParamTypeNames() == null) {
// Only a name provided, no signature so map the first
......@@ -184,8 +190,9 @@ public class ELProcessor {
int modifiers = method.getModifiers();
// Check for public method as well as being static
if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers)) {
// Check for static, public method and module access for Java 9+
JreCompat jreCompat = JreCompat.getInstance();
if (!Modifier.isStatic(modifiers) || !jreCompat.canAcccess(null, method)) {
throw new NoSuchMethodException(Util.message(context,
"elProcessor.defineFunctionInvalidMethod", method.getName(),
method.getDeclaringClass().getName()));
......