Re: [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
- From
Alex Blewitt <alex.blewitt@gmail.com>
- Date
- Aug 10, 2009, 18:11 UTC
- Message-ID
- <A85D4F42-88A0-4508-80A2-22F069CB2F49@gmail.com>
- In-Reply-To
- <20090810155207.GW1033@spearce.org>
That was ages ago that I submitted that patch. I'm pretty sure that it compiled at the time for the version of JGit that I had back then.
Sent from my (new) iPhone
On 10 Aug 2009, at 16:52, "Shawn O. Pearce" <spearce@spearce.org> wrote:
Show 31 quoted lines
> Alex Blewitt <alex.blewitt@gmail.com> wrote:
>> ---
>> .../src/org/spearce/jgit/lib/AnyObjectId.java | 6 ++++++
>> 1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/
>> AnyObjectId.java b/org.spearce.jgit/src/org/spearce/jgit/lib/
>> AnyObjectId.java
>> index acb3cb5..015042a 100644
>> --- a/org.spearce.jgit/src/org/spearce/jgit/lib/AnyObjectId.java
>> +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/AnyObjectId.java
>> @@ -448,6 +448,12 @@ public final String name() {
>> }
>>
>> /**
>> + * @return string form of the SHA-1, in lower case hexadecimal.
>> + */
>> + public final String getName() {
>> + return name();
>> + }
>
> Obviously you didn't compile test this in JGit:
>
> ./org/spearce/jgit/revwalk/RevTag.java:206: getName() in
> org.spearce.jgit.revwalk.RevTag cannot override getName() in
> org.spearce.jgit.lib.AnyObjectId; overridden method is final
>
> :-(
>
> --
> Shawn.