changeset 13396:73c72daf8e8d

8178333: CTW/PathHandler uses == instead of String::equals for string comparison Reviewed-by: kvn
author iignatyev
date Fri, 07 Apr 2017 19:36:35 -0700
parents d80c43d9a99e
children c92c6416ca03
files test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java	Fri Apr 07 10:51:28 2017 +0000
+++ b/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java	Fri Apr 07 19:36:35 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, 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
@@ -151,8 +151,9 @@
         if (id >= Utils.COMPILE_THE_WORLD_START_AT) {
             try {
                 Class<?> aClass = loader.loadClass(name);
-                if (name != "sun.reflect.misc.Trampoline"
-                        && name != "sun.tools.jconsole.OutputViewer") { // workaround for JDK-8159155
+                if (!"sun.reflect.misc.Trampoline".equals(name)
+                        // workaround for JDK-8159155
+                        && !"sun.tools.jconsole.OutputViewer".equals(name)) {
                     UNSAFE.ensureClassInitialized(aClass);
                 }
                 CompileTheWorld.OUT.printf("[%d]\t%s%n", id, name);