From 85fcc0d2db97d6d602d2d8c821cfc2b71b1269f3 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 17 Jul 2008 19:38:56 -0400 Subject: [PATCH] Remove support for legacy style TextBuiltins 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 --- org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/TextBuiltin.java | 6 ++---- 1 file 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 4c466ac2..33e3ae6a 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. -- 2.11.4.GIT