You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/10/04 10:59:34 UTC
[tomcat] branch 7.0.x updated: Additional fix releated to BZ 63781
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new 0defa1f Additional fix releated to BZ 63781
0defa1f is described below
commit 0defa1fc0804e047e671c95d65f4d97f92497a52
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Oct 3 21:54:44 2019 +0100
Additional fix releated to BZ 63781
Ensure correct exception time and exception timing for constructors
---
java/javax/el/Util.java | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/java/javax/el/Util.java b/java/javax/el/Util.java
index eb7509a..7c91a5d 100644
--- a/java/javax/el/Util.java
+++ b/java/javax/el/Util.java
@@ -596,21 +596,16 @@ class Util {
Wrapper<Constructor<?>> wrapper = findWrapper(clazz, wrappers, methodName, paramTypes, paramValues);
- Constructor<?> constructor = getConstructor(clazz, wrapper.unWrap());
- if (constructor == null) {
+ Constructor<?> constructor = wrapper.unWrap();
+
+ JreCompat jreCompat = JreCompat.getInstance();
+ if (!Modifier.isPublic(clazz.getModifiers()) || !jreCompat.canAcccess(null, constructor)) {
throw new MethodNotFoundException(message(
null, "util.method.notfound", clazz, methodName,
paramString(paramTypes)));
}
- return constructor;
- }
-
- static Constructor<?> getConstructor(Class<?> type, Constructor<?> c) {
- if (Modifier.isPublic(type.getModifiers())) {
- return c;
- }
- return null;
+ return constructor;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org