* [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
@ 2009-05-09 22:57 Alex Blewitt
2009-05-10 21:19 ` Shawn O. Pearce
2009-08-10 15:52 ` Shawn O. Pearce
0 siblings, 2 replies; 9+ messages in thread
From: Alex Blewitt @ 2009-05-09 22:57 UTC (permalink / raw)
To: spearce, robin.rosenberg; +Cc: git, Alex Blewitt
---
.../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();
+ }
+ /**
* Return unique abbreviation (prefix) of this object SHA-1.
* <p>
* This method is a utility for <code>abbreviate(repo, 8)</code>.
--
1.6.2.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2009-05-09 22:57 [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com> Alex Blewitt
@ 2009-05-10 21:19 ` Shawn O. Pearce
2009-08-10 15:52 ` Shawn O. Pearce
1 sibling, 0 replies; 9+ messages in thread
From: Shawn O. Pearce @ 2009-05-10 21:19 UTC (permalink / raw)
To: Alex Blewitt; +Cc: robin.rosenberg, git
Alex Blewitt <alex.blewitt@gmail.com> wrote:
> /**
> + * @return string form of the SHA-1, in lower case hexadecimal.
> + */
> + public final String getName() {
> + return name();
> + }
> + /**
Ok, but how about unit tests?
--
Shawn.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2009-05-09 22:57 [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com> Alex Blewitt
2009-05-10 21:19 ` Shawn O. Pearce
@ 2009-08-10 15:52 ` Shawn O. Pearce
2009-08-10 18:11 ` Alex Blewitt
2009-08-10 18:19 ` Alex Blewitt
1 sibling, 2 replies; 9+ messages in thread
From: Shawn O. Pearce @ 2009-08-10 15:52 UTC (permalink / raw)
To: Alex Blewitt; +Cc: robin.rosenberg, git
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2009-08-10 15:52 ` Shawn O. Pearce
@ 2009-08-10 18:11 ` Alex Blewitt
2009-08-10 18:19 ` Alex Blewitt
1 sibling, 0 replies; 9+ messages in thread
From: Alex Blewitt @ 2009-08-10 18:11 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: robin.rosenberg@dewire.com, git@vger.kernel.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:
> 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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2009-08-10 15:52 ` Shawn O. Pearce
2009-08-10 18:11 ` Alex Blewitt
@ 2009-08-10 18:19 ` Alex Blewitt
2009-08-10 20:59 ` Shawn O. Pearce
1 sibling, 1 reply; 9+ messages in thread
From: Alex Blewitt @ 2009-08-10 18:19 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: robin.rosenberg@dewire.com, git@vger.kernel.org
That patch was originally mailed on the 11th May. Has it taken until
now to notice the problem, or was the other method added in the last
month or so? If I'm to blame, I apologise but didn't note any compile
time issues at the time.
Alex
Sent from my (new) iPhone
On 10 Aug 2009, at 16:52, "Shawn O. Pearce" <spearce@spearce.org> wrote:
> 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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2009-08-10 18:19 ` Alex Blewitt
@ 2009-08-10 20:59 ` Shawn O. Pearce
2009-08-11 12:53 ` Alex Blewitt
0 siblings, 1 reply; 9+ messages in thread
From: Shawn O. Pearce @ 2009-08-10 20:59 UTC (permalink / raw)
To: Alex Blewitt; +Cc: robin.rosenberg@dewire.com, git@vger.kernel.org
Alex Blewitt <alex.blewitt@gmail.com> wrote:
> That patch was originally mailed on the 11th May. Has it taken until now
> to notice the problem, or was the other method added in the last month or
> so? If I'm to blame, I apologise but didn't note any compile time issues
> at the time.
Arrgh, you are right, I lost this patch in my inbox, and in the
interm we applied new features to RevTag which added getName there.
> On 10 Aug 2009, at 16:52, "Shawn O. Pearce" <spearce@spearce.org> wrote:
>> Obviously you didn't compile test this in JGit:
Never mind.
>> ./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
I can't apply this patch because getName() on RevTag is already
defined with a different meaning. :-(
--
Shawn.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2009-08-10 20:59 ` Shawn O. Pearce
@ 2009-08-11 12:53 ` Alex Blewitt
2009-08-12 14:20 ` Shawn O. Pearce
0 siblings, 1 reply; 9+ messages in thread
From: Alex Blewitt @ 2009-08-11 12:53 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: robin.rosenberg@dewire.com, git@vger.kernel.org
On 10 Aug 2009, at 21:59, "Shawn O." <spearce@spearce.org> wrote:
> Alex Blewitt <alex.blewitt@gmail.com> wrote:
>> That patch was originally mailed on the 11th May. Has it taken
>> until now
>> to notice the problem, or was the other method added in the last
>> month or
>> so? If I'm to blame, I apologise but didn't note any compile time
>> issues
>> at the time.
>
> Arrgh, you are right, I lost this patch in my inbox, and in the
> interm we applied new features to RevTag which added getName there. .
>
>>> ./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
>
> I can't apply this patch because getName() on RevTag is already
> defined with a different meaning. :-(
That sounds dangerous. We now have a .name() and a .getName() with
different semantics. Can we not change the RevTag method name to
something else so that we dont have an inconsistency?
>
Alex
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2009-08-11 12:53 ` Alex Blewitt
@ 2009-08-12 14:20 ` Shawn O. Pearce
2009-08-12 19:09 ` Robin Rosenberg
0 siblings, 1 reply; 9+ messages in thread
From: Shawn O. Pearce @ 2009-08-12 14:20 UTC (permalink / raw)
To: Alex Blewitt; +Cc: robin.rosenberg@dewire.com, git@vger.kernel.org
Alex Blewitt <alex.blewitt@gmail.com> wrote:
> On 10 Aug 2009, at 21:59, "Shawn O." <spearce@spearce.org> wrote:
>>
>>>> ./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
>>
>> I can't apply this patch because getName() on RevTag is already
>> defined with a different meaning. :-(
>
> That sounds dangerous. We now have a .name() and a .getName() with
> different semantics. Can we not change the RevTag method name to
> something else so that we dont have an inconsistency?
Good point. We didn't think that RevTag.getName method through
very well. Rename it to getTagName() ?
--
Shawn.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2009-08-12 14:20 ` Shawn O. Pearce
@ 2009-08-12 19:09 ` Robin Rosenberg
0 siblings, 0 replies; 9+ messages in thread
From: Robin Rosenberg @ 2009-08-12 19:09 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Alex Blewitt, git@vger.kernel.org
onsdag 12 augusti 2009 16:20:49 skrev "Shawn O. Pearce" <spearce@spearce.org>:
> Alex Blewitt <alex.blewitt@gmail.com> wrote:
> > On 10 Aug 2009, at 21:59, "Shawn O." <spearce@spearce.org> wrote:
> >>
> >>>> ./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
> >>
> >> I can't apply this patch because getName() on RevTag is already
> >> defined with a different meaning. :-(
> >
> > That sounds dangerous. We now have a .name() and a .getName() with
> > different semantics. Can we not change the RevTag method name to
> > something else so that we dont have an inconsistency?
>
> Good point. We didn't think that RevTag.getName method through
> very well. Rename it to getTagName() ?
Ok with me.
-- robin
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-08-12 19:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-09 22:57 [EGIT PATCH] Provide a more JavaBeans-style 'getName' accessor for the id Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com> Alex Blewitt
2009-05-10 21:19 ` Shawn O. Pearce
2009-08-10 15:52 ` Shawn O. Pearce
2009-08-10 18:11 ` Alex Blewitt
2009-08-10 18:19 ` Alex Blewitt
2009-08-10 20:59 ` Shawn O. Pearce
2009-08-11 12:53 ` Alex Blewitt
2009-08-12 14:20 ` Shawn O. Pearce
2009-08-12 19:09 ` Robin Rosenberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).