--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java Tue May 03 11:45:56 2016 +0100
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java Tue May 03 15:50:54 2016 +0200
@@ -1124,7 +1124,7 @@
private static NameService createNameService() {
String hostsFileName =
- GetPropertyAction.getProperty("jdk.net.hosts.file");
+ GetPropertyAction.privilegedGetProperty("jdk.net.hosts.file");
NameService theNameService;
if (hostsFileName != null) {
theNameService = new HostsFileNameService(hostsFileName);
@@ -1643,7 +1643,7 @@
* property can vary across implementations of the java.
* classes. The default is an empty String "".
*/
- String prefix = GetPropertyAction.getProperty("impl.prefix", "");
+ String prefix = GetPropertyAction.privilegedGetProperty("impl.prefix", "");
try {
impl = Class.forName("java.net." + prefix + implName).newInstance();
} catch (ClassNotFoundException e) {