This is an automated email from the ASF dual-hosted git repository. geertjan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
The following commit(s) were added to refs/heads/master by this push: new d9acf07 Fixing ElementHandleTest: the test expects java/lang/String$1.class on the bootclasspath, which does not appear to be in ct.sym, so using rt.jar for now. Allowing the test to run on JDK 9+ by getting proper bootclasspath. (#418) d9acf07 is described below commit d9acf07ccf3ae6307769c5c319132a3a04731052 Author: Jan Lahoda <lah...@gmail.com> AuthorDate: Tue Feb 20 09:38:24 2018 +0100 Fixing ElementHandleTest: the test expects java/lang/String$1.class on the bootclasspath, which does not appear to be in ct.sym, so using rt.jar for now. Allowing the test to run on JDK 9+ by getting proper bootclasspath. (#418) --- .../api/java/source/ElementHandleTest.java | 26 ++++++---------------- 1 file changed, 7 insertions(+), 19 deletions(-) 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 83e9add..b5e3268 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 javax.lang.model.type.TypeMirror; 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 @@ public class ElementHandleTest extends NbTestCase { } 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 class ElementHandleTest extends NbTestCase { } } - 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"); + } } -- To stop receiving notification emails like this one, please contact geert...@apache.org. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists