classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving system properties to gnu.classpath.*


From: Michael Koch
Subject: Re: Moving system properties to gnu.classpath.*
Date: Fri, 8 Oct 2004 10:13:47 +0200
User-agent: KMail/1.6.2

Am Freitag, 8. Oktober 2004 09:42 schrieb Stephen Crawley:
> address@hidden said:
> > I would like to make this new class public to do away with the
> > overhead (and initialization dependencies) of the security check,
> > but that would require some VM magic to make the class
> > inaccessible from untrusted code. Michael Koch (strongly) opposes
> > this. How would you feel about it?
>
> Speaking as yet another JVM implementor, I'm against this idea for
> the reasons given by Michael and others.

In order to find a solution would the following be a solution for you: 

public final class VMSecureProperties
{
public String getProperty(String propName, String defaultValue)
{
  GetPropertyAction getProp = new GetPropertyAction(propName, 
defaultValue);
    return (String)AccessController.doPrivileged(getProp);
}
}

This reduces out code duplication and should it make possible to do 
whatever you want inside your VM.

What do you think ?


Michael
-- 
Homepage: http://www.worldforge.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]