test/java/rmi/testlibrary/TestLibrary.java

Print this page
rev 9344 : 8036095: RMI tests using testlibrary.RMID and testlibrary.JavaVM do not pass through vmoptions
Reviewed-by: XXX

*** 1,7 **** /* ! * Copyright (c) 1998, 2013, 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) 1998, 2014, 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.
*** 152,170 **** } } while (stopTime > System.currentTimeMillis()); return false; } ! public static String getProperty(String property, String defaultVal) { ! final String prop = property; ! final String def = defaultVal; return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<String>() { public String run() { ! return System.getProperty(prop, def); } }); } /** * Property mutators */ --- 152,174 ---- } } while (stopTime > System.currentTimeMillis()); return false; } ! public static String getProperty(final String property, ! final String defaultVal) { ! try { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<String>() { public String run() { ! return System.getProperty(property, defaultVal); } }); + } catch (Exception ex) { + bomb("Exception getting property " + property, ex); + throw new AssertionError("this should be unreachable"); + } } /** * Property mutators */