Subject: Re: [PATCH JGIT] Compute the author/commiter name and email from the git configuration

From: "Shawn O. Pearce" <[email-masked]>
Date: Tue, 3 Feb 2009 16:59:07 -0800

Johannes Schindelin <[email-masked]> wrote:
> On Tue, 3 Feb 2009, Shawn O. Pearce wrote:
> > Yann Simon <[email-masked]> wrote:
> > > +			username = System.getProperty(gitVariableKey);
> > 
> > Shouldn't that be System.getenv()?
> 
> According to
> 
> http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#getenv(java.lang.String)
> 
> getenv() is deprecated.  However, in later editions (Java5 and later, to 
> be precise), that deprecation seems to be lifted...

Yea, funny thing about that.  In 1.3 getenv() worked.  In 1.4 they
not only marked it deprecated, they changed the method to always
throw a RuntimeException.  Java developers were outraged, so in 1.5
(aka Java 5) they added it back in as a supported method.

JGit only runs on Java 5 and later.  So we're safe, we don't have
to worry about this #@(!@(! method and the 1.4 mistake.

Hell, Java 6 added an executable flag to java.io.File.  This is
a rather funny concept on Windows where executablity is based on
file name and not a "mode bit", but its in the Java 6 S2SE API.
At least even on Windows getenv makes sense and provides data.

-- 
Shawn.