Author: ron.sigal(a)jboss.com
Date: 2008-03-26 03:24:49 -0400 (Wed, 26 Mar 2008)
New Revision: 3779
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
Log:
JBREM-934: Put System.getProperty() in AccessController.doPrivileged() calls.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-03-26
05:28:46 UTC (rev 3778)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-03-26
07:24:49 UTC (rev 3779)
@@ -868,7 +868,20 @@
}
if (username == null || username.length() == 0)
{
- username = System.getProperty("http.basic.username");
+ try
+ {
+ username = (String)AccessController.doPrivileged( new
PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty("http.basic.username");
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ log.debug("error", e.getCause());
+ }
}
if (metadata != null)
{
@@ -876,7 +889,20 @@
}
if (password == null)
{
- password = System.getProperty("http.basic.password");
+ try
+ {
+ password = (String)AccessController.doPrivileged( new
PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty("http.basic.password");
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ log.debug("error", e.getCause());
+ }
}
if (username != null && password != null)
Show replies by date