[hg] main-silver: #224570: Ignore all items on boot class path, ...

  • From:
  • To:
  • Subject: [hg] main-silver: #224570: Ignore all items on boot class path, ...
  • Date: Mon, 07 Jan 2013 12:13:22 -0800

changeset 50f98bb14b18 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/50f98bb14b18
description:
        #224570: Ignore all items on boot class path, that do not exist on 
disk.

diffstat:

 
debugger.jpda.ant/antsrc/org/netbeans/modules/debugger/jpda/ant/JPDAStart.java
 |  29 ++-------
 1 files changed, 7 insertions(+), 22 deletions(-)

diffs (85 lines):

diff --git 
a/debugger.jpda.ant/antsrc/org/netbeans/modules/debugger/jpda/ant/JPDAStart.java
 
b/debugger.jpda.ant/antsrc/org/netbeans/modules/debugger/jpda/ant/JPDAStart.java
--- 
a/debugger.jpda.ant/antsrc/org/netbeans/modules/debugger/jpda/ant/JPDAStart.java
+++ 
b/debugger.jpda.ant/antsrc/org/netbeans/modules/debugger/jpda/ant/JPDAStart.java
@@ -124,12 +124,6 @@
     private static final String SOCKET_CONNECTOR = 
"com.sun.jdi.SocketListen"; // NOI18N
     private static final String SHMEM_CONNECTOR = 
"com.sun.jdi.SharedMemoryListen"; // NOI18N
 
-    private static final Pattern[] BOOT_CLASSPATH_WARNING_FILTER = new 
Pattern[] {
-        Pattern.compile(".*jre.lib..*\\.jar$"),
-        Pattern.compile(".*jre.classes$"),
-        Pattern.compile(".*jdk\\.boot\\.jar$"),
-    };
-
     /** Name of the property to which the JPDA address will be set.
      * Target VM should use this address and connect to it
      */
@@ -663,7 +657,7 @@
         if (sourcepath != null && isSourcePathExclusive) {
             return convertToClassPath (project, sourcepath);
         }
-        ClassPath cp = convertToSourcePath (project, classpath, null);
+        ClassPath cp = convertToSourcePath (project, classpath, true);
         ClassPath sp = convertToClassPath (project, sourcepath);
 
         ClassPath sourcePath = ClassPathSupport.createProxyClassPath (
@@ -685,7 +679,7 @@
                 return 
ClassPathSupport.createClassPath(java.util.Collections.EMPTY_LIST);
             }
         } else {
-            return convertToSourcePath (project, bootclasspath, 
BOOT_CLASSPATH_WARNING_FILTER);
+            return convertToSourcePath (project, bootclasspath, false);
         }
     }
 
@@ -697,7 +691,7 @@
             String pathName = project.replaceProperties(paths[i]);
             File f = FileUtil.normalizeFile (project.resolveFile (pathName));
             if (!isValid (f, project)) continue;
-            URL url = fileToURL (f, project, null, false);
+            URL url = fileToURL (f, project, true, false);
             if (url == null) continue;
             l.add (url);
         }
@@ -711,7 +705,7 @@
      * the sources were not found are omitted.
      *
      */
-    private static ClassPath convertToSourcePath (Project project, Path 
path, Pattern[] warningFilters) {
+    private static ClassPath convertToSourcePath (Project project, Path 
path, boolean reportNonExistingFiles) {
         String[] paths = path == null ? new String [0] : path.list ();
         List l = new ArrayList ();
         Set exist = new HashSet ();
@@ -721,7 +715,7 @@
             File file = FileUtil.normalizeFile
                 (project.resolveFile (pathName));
             if (!isValid (file, project)) continue;
-            URL url = fileToURL (file, project, warningFilters, true);
+            URL url = fileToURL (file, project, reportNonExistingFiles, 
true);
             if (url == null) continue;
             logger.fine("convertToSourcePath - class: " + url); // NOI18N
             try {
@@ -763,21 +757,12 @@
     }
 
 
-    private static URL fileToURL (File file, Project project, Pattern[] 
warningFilters, boolean withSlash) {
+    private static URL fileToURL (File file, Project project, boolean 
reportNonExistingFiles, boolean withSlash) {
         try {
             FileObject fileObject = FileUtil.toFileObject (file);
             if (fileObject == null) {
+                if (reportNonExistingFiles) {
                 String path = file.getAbsolutePath();
-                boolean filtered = false;
-                if (warningFilters != null) {
-                    for (Pattern p : warningFilters) {
-                        if (p.matcher(path).matches()) {
-                            filtered = true;
-                            break;
-                        }
-                    }
-                }
-                if (!filtered) {
                     project.log("Have no file for "+path, Project.MSG_WARN);
                 }
                 return null;

[hg] main-silver: #224570: Ignore all items on boot class path, ...

mentlicher 01/07/2013

Project Features

About this Project

Debugger was started in November 2009, is owned by tpavek, and has 29 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close