[JGIT PATCH 28/28] Remove support for legacy style TextBuiltins
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jul 18, 2008, 01:44 UTC
- Message-ID
- <1216345461-59382-29-git-send-email-spearce@spearce.org>
- In-Reply-To
- <1216345461-59382-28-git-send-email-spearce@spearce.org>
Now that all builtins use the new automatic parsing support we want to require that they override run() and do not try to override execute().
Signed-off-by: Shawn O. Pearce <spearce@spearce.org> --- .../src/org/spearce/jgit/pgm/TextBuiltin.java | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/TextBuiltin.java b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/TextBuiltin.java index c4a55f4..9f90c16 100644 --- a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/TextBuiltin.java +++ b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/TextBuiltin.java @@ -113,7 +113,7 @@ public abstract class TextBuiltin { * framework will catch the exception and print a message on * standard error. */ - public void execute(String[] args) throws Exception { + public final void execute(String[] args) throws Exception { parseArguments(args); run(); } @@ -166,9 +166,7 @@ public abstract class TextBuiltin { * framework will catch the exception and print a message on * standard error. */ - protected void run() throws Exception { - throw die("Override either execute (legacy) or run (new style)."); - } + protected abstract void run() throws Exception; /** * @return the repository this command accesses.
-- 1.5.6.3.569.ga9185