You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/02/20 08:38:28 UTC

[GitHub] geertjanw closed pull request #418: Fixing ElementHandleTest: the test expects java/lang/String$1.class o?

geertjanw closed pull request #418: Fixing ElementHandleTest: the test expects java/lang/String$1.class o?
URL: https://github.com/apache/incubator-netbeans/pull/418
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/java.source.base/test/unit/src/org/netbeans/api/java/source/ElementHandleTest.java b/java.source.base/test/unit/src/org/netbeans/api/java/source/ElementHandleTest.java
index 83e9add71..b5e3268d2 100644
--- a/java.source.base/test/unit/src/org/netbeans/api/java/source/ElementHandleTest.java
+++ b/java.source.base/test/unit/src/org/netbeans/api/java/source/ElementHandleTest.java
@@ -44,6 +44,7 @@
 import org.netbeans.api.java.classpath.ClassPath;
 import org.netbeans.junit.NbTestCase;
 import org.netbeans.modules.java.source.ElementUtils;
+import org.netbeans.modules.java.source.TestUtil;
 import org.netbeans.modules.java.source.usages.IndexUtil;
 import org.netbeans.spi.java.classpath.ClassPathProvider;
 import org.netbeans.spi.java.classpath.support.ClassPathSupport;
@@ -115,7 +116,9 @@ protected void setUp() throws Exception {
         } finally {
             lock.releaseLock();
         }
-        ClassPathProviderImpl.getDefault().setClassPaths(createBootPath(),ClassPathSupport.createClassPath(new URL[0]),ClassPathSupport.createClassPath(new FileObject[]{this.src}));
+        ClassPathProviderImpl.getDefault().setClassPaths(TestUtil.getBootClassPath(),
+                                                         ClassPathSupport.createClassPath(new URL[0]),
+                                                         ClassPathSupport.createClassPath(new FileObject[]{this.src}));
     }
 
     protected void tearDown() throws Exception {
@@ -687,22 +690,7 @@ public static synchronized ClassPathProviderImpl getDefault () {
         }
     }
     
-    private static ClassPath createBootPath () throws IOException {
-        String bootPath = System.getProperty ("sun.boot.class.path");   //NOI18N
-        String[] paths = bootPath.split(File.pathSeparator);
-        List<URL>roots = new ArrayList<URL> (paths.length);
-        for (String path : paths) {
-            File f = new File (path);            
-            if (!f.exists()) {
-                continue;
-            }
-            URL url = Utilities.toURI(f).toURL();
-            if (FileUtil.isArchiveFile(url)) {
-                url = FileUtil.getArchiveRoot(url);
-            }
-            roots.add (url);
-        }
-        return ClassPathSupport.createClassPath(roots.toArray(new URL[roots.size()]));
-    }        
-    
+    static {
+        System.setProperty("CachingArchiveProvider.disableCtSym", "true");
+    }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists