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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to