From 060df750695b9ef98fc27c60565e3c9569c2f0fb Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Fri, 12 Jun 2009 16:00:15 -0700 Subject: [PATCH] Make RevTag getObject(), getName() final to prevent overrides 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 Signed-off-by: Robin Rosenberg --- org.spearce.jgit/src/org/spearce/jgit/revwalk/RevTag.java | 4 ++-- 1 file 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 cace82d2..83fd8738 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 class RevTag extends RevObject { * * @return object this tag refers to. */ - public RevObject getObject() { + public final RevObject getObject() { return object; } @@ -198,7 +198,7 @@ public class RevTag extends RevObject { * * @return name of the tag, according to the tag header. */ - public String getName() { + public final String getName() { return name; } -- 2.11.4.GIT