From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: git@vger.kernel.org
Subject: [JGIT PATCH 1/5] Make RevTag getObject(), getName() final to prevent overrides
Date: Fri, 12 Jun 2009 16:00:15 -0700 [thread overview]
Message-ID: <1244847619-7364-2-git-send-email-spearce@spearce.org> (raw)
In-Reply-To: <1244847619-7364-1-git-send-email-spearce@spearce.org>
These methods exist solely to export the object headers from the
tag buffer. Overriding them may create confusion by trying to
replace the value with something other than what was parsed from
the tag headers. Other methods like getShortMessage() and the
getTaggerIdent() are likewise already marked final.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
.../src/org/spearce/jgit/revwalk/RevTag.java | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/revwalk/RevTag.java b/org.spearce.jgit/src/org/spearce/jgit/revwalk/RevTag.java
index cace82d..83fd873 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/revwalk/RevTag.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/revwalk/RevTag.java
@@ -189,7 +189,7 @@ public Tag asTag(final RevWalk walk) {
*
* @return object this tag refers to.
*/
- public RevObject getObject() {
+ public final RevObject getObject() {
return object;
}
@@ -198,7 +198,7 @@ public RevObject getObject() {
*
* @return name of the tag, according to the tag header.
*/
- public String getName() {
+ public final String getName() {
return name;
}
--
1.6.3.2.367.gf0de
next prev parent reply other threads:[~2009-06-12 23:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-12 23:00 [JGIT PATCH 0/5] Fix major performance problems in UploadPack Shawn O. Pearce
2009-06-12 23:00 ` Shawn O. Pearce [this message]
2009-06-12 23:00 ` [JGIT PATCH 2/5] Allow exceptions to be created with integer type codes Shawn O. Pearce
2009-06-12 23:00 ` [JGIT PATCH 3/5] Unify RevWalk parsing code to be more consistent across types Shawn O. Pearce
2009-06-12 23:00 ` [JGIT PATCH 4/5] Change RevObject dispose() semantics to avoid reparses Shawn O. Pearce
2009-06-12 23:00 ` [JGIT PATCH 5/5] UploadPack: Only recompute okToGiveUp() if bases changed Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1244847619-7364-2-git-send-email-spearce@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg@dewire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).