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

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

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
> On Tue, 3 Feb 2009, Shawn O. Pearce wrote:
> > Yann Simon <yann.simon.fr@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux