11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 *
26 * @test
27 * @bug 8168127
28 * @summary FilePermissionCollection merges incorrectly
29 * @modules java.base/sun.security.util
30 * @library /test/lib
31 */
32
33 import sun.security.util.FilePermCompat;
34 import java.io.FilePermission;
35 import java.security.Permissions;
36 import jdk.test.lib.Asserts;
37
38 public class FilePermissionCollectionMerge {
39
40 public static void main(String[] args) throws Exception {
41 test("x");
42 test("x/*");
43 test("x/-");
44 test("*");
45 test("-");
46 test("/x");
47 test("/x/*");
48 test("/x/-");
49 }
50
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 *
26 * @test
27 * @bug 8168127
28 * @summary FilePermissionCollection merges incorrectly
29 * @modules java.base/sun.security.util
30 * @library /test/lib
31 * @build jdk.test.lib.Asserts
32 * @run main FilePermissionCollectionMerge
33 */
34
35 import sun.security.util.FilePermCompat;
36 import java.io.FilePermission;
37 import java.security.Permissions;
38 import jdk.test.lib.Asserts;
39
40 public class FilePermissionCollectionMerge {
41
42 public static void main(String[] args) throws Exception {
43 test("x");
44 test("x/*");
45 test("x/-");
46 test("*");
47 test("-");
48 test("/x");
49 test("/x/*");
50 test("/x/-");
51 }
52
|