Skip to content

Commit

Permalink
Bug 582192 Should we remove the keywords section from the leak suspects?
Browse files Browse the repository at this point in the history
Tidy up some of the generated keywords

Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=582192
Change-Id: Ibf4c2fcbbb165236dff061f12397142aa322d28b
  • Loading branch information
ajohnson1 committed Jul 15, 2023
1 parent 9c539a8 commit 5c6609f
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2021 SAP AG, IBM Corporation and others.
* Copyright (c) 2008, 2023 SAP AG, IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -862,7 +862,11 @@ private String getClassLoaderName(IObject classloader, Set<String> keywords)
String classloaderName = getName(classloader);
if (keywords != null)
{
keywords.add(classloaderName);
// Do not want the address in the keyword, so do not use getTechnicalName()
String keywordName = classloader.getClassSpecificName();
if (keywordName == null)
keywordName = classloader.getClazz().getName();
keywords.add(keywordName);
}
return HTMLUtils.escapeText(classloaderName);
}
Expand Down Expand Up @@ -1153,7 +1157,14 @@ else if (locals.contains(l))
keywords.add(p[1]);
// Extract the source file
if (p.length > 2)
keywords.add(p[2].substring(1, p[2].length() - 1));
{
// (MyClass.java(Compiled Code))
// Remove parentheses and (Compiled Code) or (Native Method)
int end = p[2].indexOf('(', 1);
if (end < 0)
end = p[2].length() - 1;
keywords.add(p[2].substring(1, end));
}
}
}
QuerySpec stackResult = new QuerySpec(Messages.LeakHunterQuery_ThreadStack, new TextResult(stackBuilder
Expand Down

0 comments on commit 5c6609f

Please sign in to comment.