< prev index next >
src/java.base/share/classes/sun/net/www/protocol/netdoc/Handler.java
Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs
*** 38,47 ****
--- 38,48 ----
import java.net.URLConnection;
import java.net.MalformedURLException;
import java.net.URLStreamHandler;
import java.io.InputStream;
import java.io.IOException;
+ import sun.security.action.GetPropertyAction;
public class Handler extends URLStreamHandler {
static URL base;
/*
*** 52,67 ****
throws IOException
{
URLConnection uc = null;
URL ru;
! Boolean tmp = java.security.AccessController.doPrivileged(
! new sun.security.action.GetBooleanAction("newdoc.localonly"));
! boolean localonly = tmp.booleanValue();
! String docurl = java.security.AccessController.doPrivileged(
! new sun.security.action.GetPropertyAction("doc.url"));
String file = u.getFile();
if (!localonly) {
try {
if (base == null) {
--- 53,66 ----
throws IOException
{
URLConnection uc = null;
URL ru;
! boolean localonly = Boolean.parseBoolean(
! GetPropertyAction.getProperty("newdoc.localonly"));
! String docurl = GetPropertyAction.getProperty("doc.url");
String file = u.getFile();
if (!localonly) {
try {
if (base == null) {
< prev index next >