--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java Thu Apr 21 14:56:40 2016 +0800
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java Thu Apr 21 13:39:53 2016 +0200
@@ -1123,8 +1123,8 @@
*/
private static NameService createNameService() {
- String hostsFileName = AccessController
- .doPrivileged(new GetPropertyAction("jdk.net.hosts.file"));
+ String hostsFileName =
+ GetPropertyAction.getProperty("jdk.net.hosts.file");
NameService theNameService;
if (hostsFileName != null) {
theNameService = new HostsFileNameService(hostsFileName);
@@ -1643,8 +1643,7 @@
* property can vary across implementations of the java.
* classes. The default is an empty String "".
*/
- String prefix = AccessController.doPrivileged(
- new GetPropertyAction("impl.prefix", ""));
+ String prefix = GetPropertyAction.getProperty("impl.prefix", "");
try {
impl = Class.forName("java.net." + prefix + implName).newInstance();
} catch (ClassNotFoundException e) {