From 487c594e06c1a45efe6e2a18e8eb193927950462 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 20 Sep 2010 18:44:29 +0000 Subject: [PATCH] Factor shared constants back out. --- .../java/com/threerings/getdown/tools/JarDiff.java | 8 ++------ .../threerings/getdown/tools/JarDiffPatcher.java | 14 +------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/threerings/getdown/tools/JarDiff.java b/src/main/java/com/threerings/getdown/tools/JarDiff.java index c85903a..ec3213f 100644 --- a/src/main/java/com/threerings/getdown/tools/JarDiff.java +++ b/src/main/java/com/threerings/getdown/tools/JarDiff.java @@ -49,12 +49,8 @@ import java.util.zip.*; * * @version 1.13, 06/26/03 */ -public class JarDiff { - public static final String VERSION_HEADER = "version 1.0"; - public static final String INDEX_NAME = "META-INF/INDEX.JD"; - public static final String REMOVE_COMMAND = "remove"; - public static final String MOVE_COMMAND = "move"; - +public class JarDiff implements JarDiffCodes +{ private static final int DEFAULT_READ_SIZE = 2048; private static byte[] newBytes = new byte[DEFAULT_READ_SIZE]; private static byte[] oldBytes = new byte[DEFAULT_READ_SIZE]; diff --git a/src/main/java/com/threerings/getdown/tools/JarDiffPatcher.java b/src/main/java/com/threerings/getdown/tools/JarDiffPatcher.java index c119038..6e7a9a9 100644 --- a/src/main/java/com/threerings/getdown/tools/JarDiffPatcher.java +++ b/src/main/java/com/threerings/getdown/tools/JarDiffPatcher.java @@ -49,20 +49,8 @@ import com.threerings.getdown.util.ProgressObserver; /** * Applies a jardiff patch to a jar file. */ -public class JarDiffPatcher +public class JarDiffPatcher implements JarDiffCodes { - /** The name of the jardiff control file. */ - public static final String INDEX_NAME = "META-INF/INDEX.JD"; - - /** The version header used in the control file. */ - public static final String VERSION_HEADER = "version 1.0"; - - /** A jardiff command to remove an entry. */ - public static final String REMOVE_COMMAND = "remove"; - - /** A jardiff command to move an entry. */ - public static final String MOVE_COMMAND = "move"; - /** * Patches the specified jar file using the supplied patch file and writing * the new jar file to the supplied target.