diff --git a/d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jar2JasminCmd.java b/d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jar2JasminCmd.java index 492e35a2f..48962c7e5 100644 --- a/d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jar2JasminCmd.java +++ b/d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jar2JasminCmd.java @@ -52,7 +52,7 @@ protected void doCommandLine() throws Exception { Path jar = new File(remainingArgs[0]).toPath().toAbsolutePath(); if (!Files.exists(jar)) { - System.err.println(jar + " is not exists"); + System.err.println(jar + " doesn't exist"); usage(); return; } diff --git a/d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jasmin2JarCmd.java b/d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jasmin2JarCmd.java index 6bd6c5413..b32db1629 100644 --- a/d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jasmin2JarCmd.java +++ b/d2j-jasmin/src/main/java/com/googlecode/d2j/jasmin/Jasmin2JarCmd.java @@ -71,7 +71,7 @@ protected void doCommandLine() throws Exception { Path jar = new File(remainingArgs[0]).toPath().toAbsolutePath(); if (!Files.exists(jar)) { - System.err.println(jar + " is not exists"); + System.err.println(jar + " doesn't exist"); usage(); return; } diff --git a/d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliCmd.java b/d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliCmd.java index f1253d702..54ac21156 100644 --- a/d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliCmd.java +++ b/d2j-smali/src/main/java/com/googlecode/d2j/smali/BaksmaliCmd.java @@ -36,7 +36,7 @@ protected void doCommandLine() throws Exception { File dex = new File(remainingArgs[0]); if (!dex.exists()) { - System.err.println("ERROR: " + dex + " is not exists"); + System.err.println("ERROR: " + dex + " doesn't exist"); return; } if (output == null) { diff --git a/dex-ir/src/main/java/com/googlecode/dex2jar/ir/TypeClass.java b/dex-ir/src/main/java/com/googlecode/dex2jar/ir/TypeClass.java index ef94b0664..d4f089be2 100644 --- a/dex-ir/src/main/java/com/googlecode/dex2jar/ir/TypeClass.java +++ b/dex-ir/src/main/java/com/googlecode/dex2jar/ir/TypeClass.java @@ -101,7 +101,7 @@ public static TypeClass merge(TypeClass thizCls, TypeClass clz) { if ((thizCls == INT && clz == BOOLEAN) || (thizCls == BOOLEAN || clz == INT)) { return INT; } - throw new RuntimeException("can not merge " + thizCls + " and " + clz); + throw new RuntimeException("Can't merge " + thizCls + " and " + clz); } else { return thizCls; } @@ -123,7 +123,7 @@ public static TypeClass merge(TypeClass thizCls, TypeClass clz) { */ private static TypeClass merge0(TypeClass a, TypeClass b) { if (a == JD || b == JD) { - throw new RuntimeException("can not merge " + a + " and " + b); + throw new RuntimeException("Can't merge " + a + " and " + b); } switch (a) { case ZIL: diff --git a/dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java b/dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java index d2c4122d3..b9d3a4a39 100755 --- a/dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java +++ b/dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java @@ -281,7 +281,7 @@ public DexFileReader(InputStream is) throws IOException { } /** - * Reads a string index. String indicies are offset by 1, and a 0 value in the stream (-1 as returned by this + * Reads a string index. String indices are offset by 1, and a 0 value in the stream (-1 as returned by this * method) means "null" * * @return index into file's string ids table, -1 means null @@ -1095,7 +1095,7 @@ private void read_annotation_set_ref_list(int parameter_annotation_offset, DexMe read_annotation_set_item(param_annotation_offset, dpav); } } catch (Exception e) { - throw new DexException(e, "while accept parameter annotation in parameter:[%d]", j); + throw new DexException(e, "While accepting parameter annotation in parameter: [%d]", j); } } } diff --git a/dex-reader/src/main/java/com/googlecode/d2j/reader/MultiDexFileReader.java b/dex-reader/src/main/java/com/googlecode/d2j/reader/MultiDexFileReader.java index d99a14440..4dfea8334 100644 --- a/dex-reader/src/main/java/com/googlecode/d2j/reader/MultiDexFileReader.java +++ b/dex-reader/src/main/java/com/googlecode/d2j/reader/MultiDexFileReader.java @@ -55,7 +55,7 @@ public static BaseDexFileReader open(byte[] data) throws IOException { return new MultiDexFileReader(dexFileReaders.values()); } } - throw new IOException("the src file not a .dex or zip file"); + throw new IOException("The source file is not a .dex or .zip file"); } void init() { diff --git a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/ApkSign.java b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/ApkSign.java index 0ab8b6778..2a3cc5975 100644 --- a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/ApkSign.java +++ b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/ApkSign.java @@ -54,7 +54,7 @@ protected void doCommandLine() throws Exception { Path apkIn = new File(remainingArgs[0]).toPath(); if (!Files.exists(apkIn)) { - System.err.println(apkIn + " is not exists"); + System.err.println(apkIn + " doesn't exist"); usage(); return; } diff --git a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/AsmVerify.java b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/AsmVerify.java index ffde075ce..0c633846e 100644 --- a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/AsmVerify.java +++ b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/AsmVerify.java @@ -118,7 +118,7 @@ protected void doCommandLine() throws Exception { for (String fn : remainingArgs) { Path file = new File(fn).toPath(); if (!Files.exists(file)) { - System.err.println(fn + " is not exists"); + System.err.println(fn + " doesn't exist"); usage(); return; } diff --git a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DeObfInitCmd.java b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DeObfInitCmd.java index a0c17f1fa..dc168ff9a 100644 --- a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DeObfInitCmd.java +++ b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DeObfInitCmd.java @@ -49,7 +49,7 @@ protected void doCommandLine() throws Exception { Path jar = new File(remainingArgs[0]).toPath(); if (!Files.exists(jar)) { - System.err.println(jar + " is not exists"); + System.err.println(jar + " doesn't exist"); usage(); return; } diff --git a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DecryptStringCmd.java b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DecryptStringCmd.java index 54e8fdb1f..216f071ab 100644 --- a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DecryptStringCmd.java +++ b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DecryptStringCmd.java @@ -162,7 +162,7 @@ protected void doCommandLine() throws Exception { final Path jar = new File(remainingArgs[0]).toPath(); if (!Files.exists(jar)) { - System.err.println(jar + " is not exists"); + System.err.println(jar + " doesn't exist"); return; } if (output == null) { diff --git a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DexRecomputeChecksum.java b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DexRecomputeChecksum.java index aa8b7005e..5a2c5e716 100644 --- a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DexRecomputeChecksum.java +++ b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/DexRecomputeChecksum.java @@ -44,7 +44,7 @@ protected void doCommandLine() throws Exception { Path jar = new File(remainingArgs[0]).toPath(); if (!Files.exists(jar)) { - System.err.println(jar + " is not exists"); + System.err.println(jar + " doesn't exist"); usage(); return; } diff --git a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/GenerateCompileStubFromOdex.java b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/GenerateCompileStubFromOdex.java index 42b12ab81..658b871f8 100644 --- a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/GenerateCompileStubFromOdex.java +++ b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/GenerateCompileStubFromOdex.java @@ -14,7 +14,8 @@ import java.nio.file.Files; import java.nio.file.Path; -@BaseCmd.Syntax(cmd = "d2j-generate-stub-from-odex", syntax = "[options] [odex1 ... odexN]", desc = "Genenerate no-code jar from odex") +@BaseCmd.Syntax(cmd = "d2j-generate-stub-from-odex", syntax = "[options] [odex1 ... odexN]", desc = + "Generate no-code jar from odex") public class GenerateCompileStubFromOdex extends BaseCmd { private static final int MAGIC_ODEX = 0x0A796564 & 0x00FFFFFF;// hex for 'dey ', ignore the 0A private static final int MAGIC_DEX = 0x0A786564 & 0x00FFFFFF;// hex for 'dex ', ignore the 0A @@ -31,7 +32,7 @@ public static void main(String... args) { @Override protected void doCommandLine() throws Exception { if (remainingArgs.length == 0) { - throw new HelpException("no odex"); + throw new HelpException("No odex"); } if (output == null) { output = new File("stub.jar").toPath(); @@ -40,7 +41,7 @@ protected void doCommandLine() throws Exception { try (FileSystem fs = createZip(output)) { Path out = fs.getPath("/"); for (String x : remainingArgs) { - System.err.println("process " + x + " ..."); + System.err.println("Processing " + x + " ..."); ByteBuffer bs = ByteBuffer.wrap(Files.readAllBytes(new File(x).toPath())) .order(ByteOrder.LITTLE_ENDIAN); int magic = bs.getInt(0) & 0x00FFFFFF; @@ -53,7 +54,7 @@ protected void doCommandLine() throws Exception { } else if (magic == MAGIC_DEX) { doDex(bs, out); } else { - throw new RuntimeException("file " + x + " is not an dex or odex"); + throw new RuntimeException("File " + x + " is not an dex or odex"); } } @@ -70,7 +71,7 @@ private void doDex(ByteBuffer bs, final Path out) { public ClassVisitor create(final String classInternalName) { final Path target = out.resolve(classInternalName + ".class"); if (Files.exists(target)) { - System.err.println("class " + classInternalName + " is already exists, skipping."); + System.err.println("Class " + classInternalName + " already exists, skipping."); return null; } return new ClassVisitor(Opcodes.ASM4, new ClassWriter(ClassWriter.COMPUTE_MAXS)) { diff --git a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/JarAccessCmd.java b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/JarAccessCmd.java index 6fd883468..0a475a85b 100644 --- a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/JarAccessCmd.java +++ b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/JarAccessCmd.java @@ -126,7 +126,7 @@ protected void doCommandLine() throws Exception { Path jar = new File(remainingArgs[0]).toPath(); if (!Files.exists(jar)) { - System.err.println(jar + " is not exists"); + System.err.println(jar + " doesn't exist"); usage(); return; } diff --git a/dex-translator/src/main/java/com/googlecode/d2j/dex/ExDex2Asm.java b/dex-translator/src/main/java/com/googlecode/d2j/dex/ExDex2Asm.java index de30fc814..86eee1222 100644 --- a/dex-translator/src/main/java/com/googlecode/d2j/dex/ExDex2Asm.java +++ b/dex-translator/src/main/java/com/googlecode/d2j/dex/ExDex2Asm.java @@ -40,7 +40,7 @@ public void convertCode(DexMethodNode methodNode, MethodVisitor mv, ClzCtx clzCt super.convertCode(methodNode, mn, clzCtx); } catch (Exception ex) { if (exceptionHandler == null) { - throw new DexException(ex, "fail convert code for %s", methodNode.method); + throw new DexException(ex, "Failed to convert code for %s", methodNode.method); } else { mn.instructions.clear(); mn.tryCatchBlocks.clear(); diff --git a/dex-translator/src/test/java/com/googlecode/dex2jar/test/TestUtils.java b/dex-translator/src/test/java/com/googlecode/dex2jar/test/TestUtils.java index f75531a8a..7a8d85e3d 100644 --- a/dex-translator/src/test/java/com/googlecode/dex2jar/test/TestUtils.java +++ b/dex-translator/src/test/java/com/googlecode/dex2jar/test/TestUtils.java @@ -308,7 +308,7 @@ public void convertCode(DexMethodNode methodNode, MethodVisitor mv, ClzCtx clzCt } catch (IOException e) { e.printStackTrace(); } - throw new DexException(ex, "fail convert code %s", methodNode.method); + throw new DexException(ex, "Failed to convert code for %s", methodNode.method); } } };