changeset 12281:a169535aff9d

7107018: sun.jvm.hotspot.utilities.soql.JSJavaHeap.forEachClass incorrect test Summary: Correction for incorrect double checking of ?k? not being null. Reviewed-by: dsamersoff, rehn Contributed-by: jini.george@oracle.com
author dsamersoff
date Wed, 09 Nov 2016 09:30:27 +0300
parents 0baa3226c993
children 3784c8f92b5b a71b53580d07
files src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaHeap.java
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaHeap.java	Mon Nov 07 17:02:46 2016 +0100
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaHeap.java	Wed Nov 09 09:30:27 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -177,14 +177,14 @@
                         JSJavaObject k = jk.getJSJavaClass();
                         JSJavaObject l = factory.newJSJavaObject(loader);
                         if (k != null) {
-                         if (k != null) {
-                       try {
-                               finalFunc.call(new Object[] { k, l });
-                       } catch (ScriptException exp) {
-                         throw new RuntimeException(exp);
+                          if (l != null) {
+                            try {
+                              finalFunc.call(new Object[] { k, l });
+                            } catch (ScriptException exp) {
+                              throw new RuntimeException(exp);
+                            }
+                          }
                        }
-                           }
-                        }
                     }
                 });