< prev index next >
test/langtools/tools/javac/modules/ContainsTest.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 127,137 ****
new JarTask(tb).run("cf", jar.toString(), "-C", classes.toString(), "p");
Path c = src.resolve("p/C.java");
Path x = base.resolve("src2/p/C.java");
! try (FileSystem jarFS = FileSystems.newFileSystem(jar, null);
StandardJavaFileManager fm = javaCompiler.getStandardFileManager(null, null, null)) {
Path jarRoot = jarFS.getRootDirectories().iterator().next();
fm.setLocationFromPaths(StandardLocation.CLASS_PATH, List.of(src, jarRoot));
checkContains(fm, StandardLocation.CLASS_PATH, c, true);
--- 127,137 ----
new JarTask(tb).run("cf", jar.toString(), "-C", classes.toString(), "p");
Path c = src.resolve("p/C.java");
Path x = base.resolve("src2/p/C.java");
! try (FileSystem jarFS = FileSystems.newFileSystem(jar, (ClassLoader)null);
StandardJavaFileManager fm = javaCompiler.getStandardFileManager(null, null, null)) {
Path jarRoot = jarFS.getRootDirectories().iterator().next();
fm.setLocationFromPaths(StandardLocation.CLASS_PATH, List.of(src, jarRoot));
checkContains(fm, StandardLocation.CLASS_PATH, c, true);
< prev index next >