[hg] main-silver: no whitelists for tests

  • From: Milos Kleint < >
  • To: ,
  • Subject: [hg] main-silver: no whitelists for tests
  • Date: Fri, 01 Feb 2013 04:28:59 -0800

changeset bb986bc195b3 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/bb986bc195b3
description:
        no whitelists for tests

diffstat:

 
maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
 |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (30 lines):

diff --git 
a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
 
b/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
--- 
a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
+++ 
b/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
@@ -68,11 +68,13 @@
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.netbeans.api.annotations.common.NonNull;
+import org.netbeans.api.java.classpath.ClassPath;
 import org.netbeans.api.java.source.ElementHandle;
 import org.netbeans.api.project.Project;
 import org.netbeans.api.whitelist.WhiteListQuery;
 import org.netbeans.modules.maven.api.NbMavenProject;
 import org.netbeans.modules.maven.api.PluginPropertyUtils;
+import 
org.netbeans.modules.maven.api.classpath.ProjectSourcesClassPathProvider;
 import org.netbeans.spi.project.ProjectServiceProvider;
 import org.netbeans.spi.whitelist.WhiteListQueryImplementation;
 import org.openide.filesystems.FileObject;
@@ -127,6 +129,12 @@
             //a temporary thing to enable the whitelists for 
experimentation..
             return null;
         }
+        ProjectSourcesClassPathProvider prov = 
project.getLookup().lookup(ProjectSourcesClassPathProvider.class);
+        assert prov != null;
+        ClassPath cp = prov.getProjectSourcesClassPath(ClassPath.SOURCE);
+        if (!cp.contains(file)) {
+            return null;
+        }     
         
         if (initialized.compareAndSet(false, true)) {
             //TODO listen to classpath changes only?

[hg] main-silver: no whitelists for tests

Milos Kleint 02/01/2013

Project Features

About this Project

APIsupport was started in November 2009, is owned by Antonin Nebuzelsky, and has 43 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close