Adding constant for line.separator and friends
martinrb at google.com
Tue Nov 10 04:29:51 UTC 2009
On Mon, Nov 9, 2009 at 20:14, Joe Darcy <Joe.Darcy at sun.com> wrote:
> Martin Buchholz wrote:
> Hi Martin,
> Given that these values are not true constants since they vary across
> platforms, I think it is misleading to make them look like constant by
> having them be "public static final" fields with ALL CAPS names.
> I would prefer to see these values returned by wrapper methods that did the
> necessary security checks and caching.
We could certainly turn the fields into methods.
Since line.separator is the most popular system property,
and other system properties like
java.home have vague security implications
that would suggest they must be protected by
a security manager, we might consider just
making the one system property available.
Perhaps very simply
or we could put it into java.io.File
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the core-libs-dev