From 60bc649d8a3d5e2de5493481cfb46476ab7f99af Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 17 Jul 2008 21:44:21 -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 Signed-off-by: Robin Rosenberg --- 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 f3561ee5..d02a0a22 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