[JGIT PATCH 28/28] Remove support for legacy style TextBuiltins

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 .../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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux