--- old/test/jdk/internal/jrtfs/WithSecurityManager.java 2015-06-23 14:29:09.000000000 +0200 +++ new/test/jdk/internal/jrtfs/WithSecurityManager.java 2015-06-23 14:29:09.000000000 +0200 @@ -55,7 +55,8 @@ FileSystems.getFileSystem(URI.create("jrt:/")); if (!allow) throw new RuntimeException("access not expected"); } catch (SecurityException se) { - if (allow) throw new RuntimeException("access expected"); + if (allow) + throw se; } // check FileSystems.newFileSystem @@ -63,7 +64,8 @@ FileSystems.newFileSystem(URI.create("jrt:/"), null); if (!allow) throw new RuntimeException("access not expected"); } catch (SecurityException se) { - if (allow) throw new RuntimeException("access expected"); + if (allow) + throw se; } // check Paths.get @@ -71,7 +73,8 @@ 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"); + if (allow) + throw se; } } }