Re: [PATCH JGIT] Compute the author/commiter name and email from the git configuration
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Feb 4, 2009, 01:01 UTC
- Message-ID
- <20090204010116.GB23383@spearce.org>
- In-Reply-To
- <200902040155.15206.robin.rosenberg.lists@dewire.com>
Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
Show 10 quoted lines
> onsdag 04 februari 2009 00:20:03 skrev Johannes Schindelin: > > 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... > > It was worse, it wasn't even implemented. You got a runtime exception back then (1.3 or 1.4). > So now it's fine.
FWIW, it worked in 1.3 and returned correct data on platforms that had a notion of "environment" (POSIX, Windows, not Mac OS 9). It was only 1.4 that threw a RuntimeException.
That was a HUGE mistake on the Sun developer's part. IMHO, 1.4 should have always returned NULL instead of throwing RuntimeException. Most applications had ways to work around not getting a particular value from the environment, e.g. if the end-user didn't set something. But they weren't prepared to handle a new class of RuntimeException coming out of a method in System.
-- Shawn.