changeset 1597:bb77b3156c6e

8032763: Remove use of sun.misc.Ref from hprof parser in testlibrary Reviewed-by: jbachorik, alanb
author ykantser
date Thu, 09 Jul 2015 12:56:38 +0200
parents e8c2eba0af51
children b82c27650a7e
files test/lib/share/classes/jdk/test/lib/hprof/model/Snapshot.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/Snapshot.java	Mon Jul 06 22:19:29 2015 -0400
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/Snapshot.java	Thu Jul 09 12:56:38 2015 +0200
@@ -276,10 +276,8 @@
         fakeClasses.clear();
 
         weakReferenceClass = findClass("java.lang.ref.Reference");
-        if (weakReferenceClass == null)  {      // JDK 1.1.x
-            weakReferenceClass = findClass("sun.misc.Ref");
-            referentFieldIndex = 0;
-        } else {
+        referentFieldIndex = 0;
+        if (weakReferenceClass != null)  {
             JavaField[] fields = weakReferenceClass.getFieldsForInstance();
             for (int i = 0; i < fields.length; i++) {
                 if ("referent".equals(fields[i].getName())) {