Skip to content

Commit 141c2be

Browse files
committed
cleanup of java core classes filter; new jdk.** package added
1 parent 7c47121 commit 141c2be

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

visualvm/profiling/src/com/sun/tools/visualvm/profiling/presets/ProfilerPresets.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import org.openide.util.NbBundle;
5353
import org.openide.util.NbPreferences;
5454
import org.openide.util.RequestProcessor;
55-
import org.openide.util.Utilities;
5655

5756
/**
5857
*
@@ -76,6 +75,8 @@ public final class ProfilerPresets {
7675

7776
static final String DEFINE_CLASSES = NbBundle.getMessage(ProfilerPresets.class, "HINT_Define_roots"); // NOI18N
7877

78+
private static final String INTERNAL_JAVA_FILTER = "com.sun.**, sun.**, sunw.**,\napple.laf.**, apple.awt.**, com.apple.**,\norg.omg.CORBA.**, org.omg.CosNaming.**, COM.rsa.**"; // NOI18N
79+
private static final String CORE_JAVA_FILTER = "java.**, javax.**, jdk.**,\n"+INTERNAL_JAVA_FILTER; // NOI18N
7980

8081
public static synchronized ProfilerPresets getInstance() {
8182
if (INSTANCE == null) INSTANCE = new ProfilerPresets();
@@ -298,9 +299,7 @@ private static String getMainClass(Application application) {
298299
}
299300

300301
private static String getDefaultFiltersS() {
301-
return Utilities.isMac() ?
302-
"java.**, javax.**,\nsun.**, sunw.**, com.sun.**,\ncom.apple.**, apple.awt.**, apple.laf.**" : // NOI18N
303-
"java.**, javax.**,\nsun.**, sunw.**, com.sun.**"; // NOI18N
302+
return CORE_JAVA_FILTER;
304303
}
305304

306305
private static String getDefaultRootsP(Application application) {
@@ -313,12 +312,7 @@ private static String getDefaultRootsP(Application application) {
313312
}
314313

315314
private static String getDefaultFiltersP(String defaultRoots) {
316-
if (defaultRoots.isEmpty())
317-
return !Utilities.isMac() ? "sun.**, sunw.**, com.sun.**" : // NOI18N
318-
"sun.**, sunw.**, com.sun.**,\ncom.apple.**, apple.awt.**, apple.laf.**"; // NOI18N
319-
else
320-
return !Utilities.isMac() ? "java.**, javax.**,\nsun.**, sunw.**, com.sun.**" : // NOI18N
321-
"java.**, javax.**,\nsun.**, sunw.**, com.sun.**,\ncom.apple.**, apple.awt.**, apple.laf.**"; // NOI18N
315+
return defaultRoots.isEmpty() ? INTERNAL_JAVA_FILTER : CORE_JAVA_FILTER;
322316
}
323317

324318
private static String getDefaultMemoryFilterP(Application application) {

0 commit comments

Comments
 (0)