8042778: Getting all visible methods in ReferenceTypeImpl is slow
authorjmanson
Thu, 10 Jul 2014 16:26:38 +0200
changeset 25513 296740f55f9b
parent 25456 39cfdc2dcaf3
child 25514 3cc6665bb6f4
8042778: Getting all visible methods in ReferenceTypeImpl is slow Reviewed-by: egahlin, dholmes
jdk/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java
--- a/jdk/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java	Wed Jul 05 19:50:06 2017 +0200
+++ b/jdk/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java	Thu Jul 10 16:26:38 2014 +0200
@@ -529,7 +529,7 @@
          * to filter that ordered collection.
          */
         List<Method> list = allMethods();
-        list.retainAll(map.values());
+        list.retainAll(new HashSet<Method>(map.values()));
         return list;
     }