< prev index next >

test/jdk/internal/jrtfs/WithSecurityManager.java

Print this page

        

*** 53,77 **** // check FileSystems.getFileSystem try { FileSystems.getFileSystem(URI.create("jrt:/")); if (!allow) throw new RuntimeException("access not expected"); } catch (SecurityException se) { ! if (allow) throw new RuntimeException("access expected"); } // check FileSystems.newFileSystem try { FileSystems.newFileSystem(URI.create("jrt:/"), null); if (!allow) throw new RuntimeException("access not expected"); } catch (SecurityException se) { ! if (allow) throw new RuntimeException("access expected"); } // check Paths.get try { Paths.get(URI.create("jrt:/java.base/java/lang/Object.class")); if (!allow) throw new RuntimeException("access not expected"); } catch (SecurityException se) { ! if (allow) throw new RuntimeException("access expected"); } } } --- 53,80 ---- // check FileSystems.getFileSystem try { FileSystems.getFileSystem(URI.create("jrt:/")); if (!allow) throw new RuntimeException("access not expected"); } catch (SecurityException se) { ! if (allow) ! throw se; } // check FileSystems.newFileSystem try { FileSystems.newFileSystem(URI.create("jrt:/"), null); if (!allow) throw new RuntimeException("access not expected"); } catch (SecurityException se) { ! if (allow) ! throw se; } // check Paths.get try { Paths.get(URI.create("jrt:/java.base/java/lang/Object.class")); if (!allow) throw new RuntimeException("access not expected"); } catch (SecurityException se) { ! if (allow) ! throw se; } } }
< prev index next >