Usage of System.getProperty() vs. SystemProperties.getProperty()

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

 



Wolfgang Baer wrote:
> I am a bit confused when to use the internal 
> SystemProperties.getProperty()
> method over the normal System.getProperty() method.

When writing new code (or modifying existing code) you should almost
always use SystemProperties.getProperty(). Unless that would be a clear
security risk and/or it is documented that the method does a security
check on the property.

The reason there is still a lot of code that uses System.getProperty()
is either historical (i.e. SystemProperties was introduced after that
code was written) or because the author was unaware of SystemProperties.
We've not been as careful about this as we maybe should be.

Regards,
Jeroen


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux