~openjdk/openjdk/openjdk7

« back to all changes in this revision

Viewing changes to patches/sec-webrev-8u111-S8157739.jdk.patch

  • Committer: Matthias Klose
  • Date: 2017-02-07 10:02:38 UTC
  • Revision ID: doko@ubuntu.com-20170207100238-gpshn1lc935esdpp
openjdk-7 (7u121-2.6.8-1) experimental; urgency=medium

  * IcedTea release 2.6.8 (based on 7u121):

 -- Matthias Klose <doko@ubuntu.com>  Mon, 14 Nov 2016 13:38:40 +0100

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# HG changeset patch
2
 
# User hb
3
 
# Date 1468338405 -3600
4
 
#      Tue Jul 12 16:46:45 2016 +0100
5
 
# Node ID 588df0398c57435632a737bd64ab75f0d3885b54
6
 
# Parent  49681546459cb98374c07a465d09b3870e9fbfbf
7
 
8157739: Classloader Consistency Checking
8
 
Reviewed-by: ahgross, akulyakh, dfuchs, jwilhelm, skoivu
9
 
 
10
 
---
11
 
 openjdk/jdk/src/share/classes/com/sun/jmx/remote/util/ClassLoaderWithRepository.java |   12 +++++++++-
12
 
 1 file changed, 11 insertions(+), 1 deletion(-)
13
 
 
14
 
--- openjdk/jdk/src/share/classes/com/sun/jmx/remote/util/ClassLoaderWithRepository.java.orig
15
 
+++ openjdk/jdk/src/share/classes/com/sun/jmx/remote/util/ClassLoaderWithRepository.java
16
 
@@ -39,8 +39,9 @@ public class ClassLoaderWithRepository e
17
 
    }
18
 
 
19
 
     protected Class<?> findClass(String name) throws ClassNotFoundException {
20
 
+        Class<?> cls;
21
 
         try {
22
 
-            return repository.loadClass(name);
23
 
+            cls = repository.loadClass(name);
24
 
         } catch (ClassNotFoundException cne) {
25
 
             if (cl2 != null) {
26
 
                 return cl2.loadClass(name);
27
 
@@ -48,6 +49,15 @@ public class ClassLoaderWithRepository e
28
 
                 throw cne;
29
 
             }
30
 
         }
31
 
+
32
 
+        if(!cls.getName().equals(name)){
33
 
+            if (cl2 != null) {
34
 
+                return cl2.loadClass(name);
35
 
+            } else {
36
 
+                throw new ClassNotFoundException(name);
37
 
+            }
38
 
+        }
39
 
+        return cls;
40
 
     }
41
 
 
42
 
     private ClassLoaderRepository repository;