changeset 14766:5d95d1611ec7

8144526: Remove Marlin logging use of deleted internal API Reviewed-by: flar
author prr
date Wed, 02 Dec 2015 10:47:21 -0800
parents 5d0bed389ded
children dcfdd2a451d5
files src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java
diffstat 1 files changed, 0 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java	Wed Dec 02 09:15:12 2015 -0800
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java	Wed Dec 02 10:47:21 2015 -0800
@@ -25,8 +25,6 @@
 
 package sun.java2d.marlin;
 
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
 
 public final class MarlinUtils {
     // TODO: use sun.util.logging.PlatformLogger once in JDK9
@@ -70,31 +68,6 @@
         String sourceClassName = null;
         String sourceMethodName = null;
 
-        JavaLangAccess access = SharedSecrets.getJavaLangAccess();
-        Throwable throwable = new Throwable();
-        int depth = access.getStackTraceDepth(throwable);
-
-        boolean lookingForClassName = true;
-        for (int ix = 0; ix < depth; ix++) {
-            // Calling getStackTraceElement directly prevents the VM
-            // from paying the cost of building the entire stack frame.
-            StackTraceElement frame = access.getStackTraceElement(throwable, ix);
-            String cname = frame.getClassName();
-            if (lookingForClassName) {
-                // Skip all frames until we have found the first frame having the class name.
-                if (cname.equals(className)) {
-                    lookingForClassName = false;
-                }
-            } else {
-                if (!cname.equals(className)) {
-                    // We've found the relevant frame.
-                    sourceClassName = cname;
-                    sourceMethodName = frame.getMethodName();
-                    break;
-                }
-            }
-        }
-
         if (sourceClassName != null) {
             return sourceClassName + " " + sourceMethodName;
         } else {