8178333: CTW/PathHandler uses == instead of String::equals for string comparison
authoriignatyev
Fri, 07 Apr 2017 19:36:35 -0700
changeset 44525 1bb478bd47b5
parent 44523 4c7c8239720c
child 44526 731e3ea86eb2
8178333: CTW/PathHandler uses == instead of String::equals for string comparison Reviewed-by: kvn
hotspot/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java
--- a/hotspot/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java	Fri Apr 07 10:51:28 2017 +0000
+++ b/hotspot/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);