Author: ron.sigal(a)jboss.com
Date: 2008-03-26 00:33:26 -0400 (Wed, 26 Mar 2008)
New Revision: 3767
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java
Log:
JBREM-934: Put Boolean.getBoolean() and Integer.getInteger() in
AccessController.doPrivileged() calls.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java 2008-03-26
04:31:59 UTC (rev 3766)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java 2008-03-26
04:33:26 UTC (rev 3767)
@@ -23,6 +23,8 @@
import java.io.Externalizable;
import java.io.StreamCorruptedException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
/**
@@ -36,8 +38,24 @@
{
static final long serialVersionUID = 5984363018051268886L;
- private static final int MIN_COMPRESS =
Integer.parseInt(System.getProperty("jboss.remoting.compression.min",
"1000"));
- private static final boolean DEBUG =
Boolean.getBoolean("jboss.remoting.compression.debug");
+ private static final boolean DEBUG =
+ ((Boolean) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return new
Boolean(Boolean.getBoolean("jboss.remoting.compression.debug"));
+ }
+ })).booleanValue();
+
+ private static final int MIN_COMPRESS =
+ ((Integer)AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return Integer.getInteger("jboss.remoting.compression.min", 1000);
+ }
+ })).intValue();
+
private int compressionLevel;
private int compressedSize;
private int originalSize;
Show replies by date