changeset 11238:42737fa6b0b3

8074696: Remote debugging session hangs for several minutes when calling findBootType Reviewed-by: sspitsyn, jbachorik
author aeriksso
date Fri, 30 Oct 2015 13:13:13 +0100
parents 2b39796bc876
children 0eb62e4a75e6
files src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Fri Oct 30 12:40:49 2015 +0000
+++ b/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Fri Oct 30 13:13:13 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -1041,12 +1041,11 @@
     }
 
     Type findBootType(String signature) throws ClassNotLoadedException {
-        List<ReferenceType> types = allClasses();
+        List<ReferenceType> types = retrieveClassesBySignature(signature);
         Iterator<ReferenceType> iter = types.iterator();
         while (iter.hasNext()) {
             ReferenceType type = iter.next();
-            if ((type.classLoader() == null) &&
-                (type.signature().equals(signature))) {
+            if (type.classLoader() == null) {
                 return type;
             }
         }