diff options
author | mikaelpeltier <mikaelpeltier@google.com> | 2014-04-17 16:41:14 +0200 |
---|---|---|
committer | mikaelpeltier <mikaelpeltier@google.com> | 2014-04-17 16:41:14 +0200 |
commit | 5697c2e67fb25e7ed4bc40975ed29a8d64283d40 (patch) | |
tree | 7a0f29098c74f3fbad4e4cdad3e39ff21b9773e0 /dx | |
parent | 7da7b7cd206f6319c95bc53be489067f6690e350 (diff) | |
download | toolchain_jack-5697c2e67fb25e7ed4bc40975ed29a8d64283d40.zip toolchain_jack-5697c2e67fb25e7ed4bc40975ed29a8d64283d40.tar.gz toolchain_jack-5697c2e67fb25e7ed4bc40975ed29a8d64283d40.tar.bz2 |
Remove all remaining warnings from Dx project
Change-Id: I85ce2bc13ffcdfc00e023bdcb0cbd1d7df5b0975
Diffstat (limited to 'dx')
32 files changed, 117 insertions, 108 deletions
diff --git a/dx/src/com/android/jack/dx/io/DexBuffer.java b/dx/src/com/android/jack/dx/io/DexBuffer.java index e273f4b..c218cc3 100644 --- a/dx/src/com/android/jack/dx/io/DexBuffer.java +++ b/dx/src/com/android/jack/dx/io/DexBuffer.java @@ -168,6 +168,7 @@ public final class DexBuffer { loadFrom(zipFile.getInputStream(entry)); zipFile.close(); } else { + zipFile.close(); throw new DexException("Expected " + DexFormat.DEX_IN_JAR_NAME + " in " + file); } } else if (file.getName().endsWith(".dex")) { diff --git a/dx/src/com/android/jack/dx/io/DexHasher.java b/dx/src/com/android/jack/dx/io/DexHasher.java index 3a9b3ba..3e921c3 100644 --- a/dx/src/com/android/jack/dx/io/DexHasher.java +++ b/dx/src/com/android/jack/dx/io/DexHasher.java @@ -16,7 +16,6 @@ package com.android.jack.dx.io; -import java.io.IOException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.zip.Adler32; @@ -35,7 +34,7 @@ public final class DexHasher { * first 32 bytes of dex files are not specified to be included in the * signature. */ - public byte[] computeSignature(DexBuffer dex) throws IOException { + public byte[] computeSignature(DexBuffer dex) { MessageDigest digest; try { digest = MessageDigest.getInstance("SHA-1"); @@ -52,7 +51,7 @@ public final class DexHasher { /** * Returns the checksum of all but the first 12 bytes of {@code dex}. */ - public int computeChecksum(DexBuffer dex) throws IOException { + public int computeChecksum(DexBuffer dex) { Adler32 adler32 = new Adler32(); int offset = CHECKSUM_OFFSET + CHECKSUM_SIZE; @@ -65,7 +64,7 @@ public final class DexHasher { * Generates the signature and checksum of the dex file {@code out} and * writes them to the file. */ - public void writeHashes(DexBuffer dex) throws IOException { + public void writeHashes(DexBuffer dex) { byte[] signature = computeSignature(dex); dex.open(SIGNATURE_OFFSET).write(signature); diff --git a/dx/src/com/android/jack/dx/io/DexIndexPrinter.java b/dx/src/com/android/jack/dx/io/DexIndexPrinter.java index 89dc385..a260112 100644 --- a/dx/src/com/android/jack/dx/io/DexIndexPrinter.java +++ b/dx/src/com/android/jack/dx/io/DexIndexPrinter.java @@ -43,7 +43,7 @@ public final class DexIndexPrinter { } } - private void printStrings() throws IOException { + private void printStrings() { int index = 0; for (String string : dexBuffer.strings()) { System.out.println("string " + index + ": " + string); @@ -51,7 +51,7 @@ public final class DexIndexPrinter { } } - private void printTypeIds() throws IOException { + private void printTypeIds() { int index = 0; for (Integer type : dexBuffer.typeIds()) { System.out.println("type " + index + ": " + dexBuffer.strings().get(type)); @@ -59,7 +59,7 @@ public final class DexIndexPrinter { } } - private void printProtoIds() throws IOException { + private void printProtoIds() { int index = 0; for (ProtoId protoId : dexBuffer.protoIds()) { System.out.println("proto " + index + ": " + protoId); @@ -67,7 +67,7 @@ public final class DexIndexPrinter { } } - private void printFieldIds() throws IOException { + private void printFieldIds() { int index = 0; for (FieldId fieldId : dexBuffer.fieldIds()) { System.out.println("field " + index + ": " + fieldId); @@ -75,7 +75,7 @@ public final class DexIndexPrinter { } } - private void printMethodIds() throws IOException { + private void printMethodIds() { int index = 0; for (MethodId methodId : dexBuffer.methodIds()) { System.out.println("methodId " + index + ": " + methodId); @@ -83,7 +83,7 @@ public final class DexIndexPrinter { } } - private void printTypeLists() throws IOException { + private void printTypeLists() { if (tableOfContents.typeLists.off == -1) { System.out.println("No type lists"); return; diff --git a/dx/src/com/android/jack/dx/io/EncodedValueReader.java b/dx/src/com/android/jack/dx/io/EncodedValueReader.java index d7eade0..d65d35c 100644 --- a/dx/src/com/android/jack/dx/io/EncodedValueReader.java +++ b/dx/src/com/android/jack/dx/io/EncodedValueReader.java @@ -117,32 +117,44 @@ public class EncodedValueReader { } } + @SuppressWarnings("unused") protected void visitArray(int size) {} + @SuppressWarnings("unused") protected void visitAnnotation(int typeIndex, int size) {} + @SuppressWarnings("unused") protected void visitAnnotationName(int nameIndex) {} + @SuppressWarnings("unused") protected void visitPrimitive(int argAndType, int type, int arg, int size) { for (int i = 0; i < size; i++) { in.readByte(); } } + @SuppressWarnings("unused") protected void visitString(int type, int index) {} + @SuppressWarnings("unused") protected void visitType(int type, int index) {} + @SuppressWarnings("unused") protected void visitField(int type, int index) {} + @SuppressWarnings("unused") protected void visitMethod(int type, int index) {} + @SuppressWarnings("unused") protected void visitArrayValue(int argAndType) {} + @SuppressWarnings("unused") protected void visitAnnotationValue(int argAndType) {} + @SuppressWarnings("unused") protected void visitEncodedBoolean(int argAndType) {} + @SuppressWarnings("unused") protected void visitEncodedNull(int argAndType) {} private int readIndex(ByteInput in, int byteCount) { diff --git a/dx/src/com/android/jack/dx/io/OpcodeInfo.java b/dx/src/com/android/jack/dx/io/OpcodeInfo.java index 655e528..95faaa5 100644 --- a/dx/src/com/android/jack/dx/io/OpcodeInfo.java +++ b/dx/src/com/android/jack/dx/io/OpcodeInfo.java @@ -950,7 +950,7 @@ public final class OpcodeInfo { } /** - * Gets the {@link @Info} for the given opcode value. + * Gets the {@link Info} for the given opcode value. * * @param opcode {@code Opcodes.MIN_VALUE..Opcodes.MAX_VALUE;} the * opcode value diff --git a/dx/src/com/android/jack/dx/io/instructions/BaseCodeCursor.java b/dx/src/com/android/jack/dx/io/instructions/BaseCodeCursor.java index f62c9aa..0e75fa7 100644 --- a/dx/src/com/android/jack/dx/io/instructions/BaseCodeCursor.java +++ b/dx/src/com/android/jack/dx/io/instructions/BaseCodeCursor.java @@ -24,7 +24,7 @@ public abstract class BaseCodeCursor implements CodeCursor { /** base address map */ private final AddressMap baseAddressMap; - /** next index within {@link #array} to read from or write to */ + /** next index within {@code array} to read from or write to */ private int cursor; /** @@ -35,21 +35,21 @@ public abstract class BaseCodeCursor implements CodeCursor { this.cursor = 0; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public final int cursor() { return cursor; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public final int baseAddressForCursor() { int mapped = baseAddressMap.get(cursor); return (mapped >= 0) ? mapped : cursor; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public final void setBaseAddress(int targetAddress, int baseAddress) { baseAddressMap.put(targetAddress, baseAddress); } diff --git a/dx/src/com/android/jack/dx/io/instructions/CodeCursor.java b/dx/src/com/android/jack/dx/io/instructions/CodeCursor.java index 98e8eae..a7c3bdd 100644 --- a/dx/src/com/android/jack/dx/io/instructions/CodeCursor.java +++ b/dx/src/com/android/jack/dx/io/instructions/CodeCursor.java @@ -30,8 +30,8 @@ public interface CodeCursor { /** * Gets the base address associated with the current cursor. This - * differs from the cursor value when explicitly set (by {@link - * #setBaseAddress). This is used, in particular, to convey base + * differs from the cursor value when explicitly set (by {@code + * setBaseAddress}). This is used, in particular, to convey base * addresses to switch data payload instructions, whose relative * addresses are relative to the address of a dependant switch * instruction. diff --git a/dx/src/com/android/jack/dx/io/instructions/FillArrayDataPayloadDecodedInstruction.java b/dx/src/com/android/jack/dx/io/instructions/FillArrayDataPayloadDecodedInstruction.java index 35ada3e..18533d6 100644 --- a/dx/src/com/android/jack/dx/io/instructions/FillArrayDataPayloadDecodedInstruction.java +++ b/dx/src/com/android/jack/dx/io/instructions/FillArrayDataPayloadDecodedInstruction.java @@ -71,8 +71,8 @@ public final class FillArrayDataPayloadDecodedInstruction extends DecodedInstruc this(format, opcode, data, data.length, 8); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getRegisterCount() { return 0; } @@ -89,8 +89,8 @@ public final class FillArrayDataPayloadDecodedInstruction extends DecodedInstruc return data; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public DecodedInstruction withIndex(int newIndex) { throw new UnsupportedOperationException("no index in instruction"); } diff --git a/dx/src/com/android/jack/dx/io/instructions/FiveRegisterDecodedInstruction.java b/dx/src/com/android/jack/dx/io/instructions/FiveRegisterDecodedInstruction.java index a7a1aea..5059371 100644 --- a/dx/src/com/android/jack/dx/io/instructions/FiveRegisterDecodedInstruction.java +++ b/dx/src/com/android/jack/dx/io/instructions/FiveRegisterDecodedInstruction.java @@ -60,44 +60,44 @@ public final class FiveRegisterDecodedInstruction extends DecodedInstruction { this.e = e; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getRegisterCount() { return 5; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getA() { return a; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getB() { return b; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getC() { return c; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getD() { return d; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getE() { return e; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public DecodedInstruction withIndex(int newIndex) { return new FiveRegisterDecodedInstruction(getFormat(), getOpcode(), diff --git a/dx/src/com/android/jack/dx/io/instructions/FourRegisterDecodedInstruction.java b/dx/src/com/android/jack/dx/io/instructions/FourRegisterDecodedInstruction.java index 912a8eb..e2e5f08 100644 --- a/dx/src/com/android/jack/dx/io/instructions/FourRegisterDecodedInstruction.java +++ b/dx/src/com/android/jack/dx/io/instructions/FourRegisterDecodedInstruction.java @@ -55,38 +55,38 @@ public final class FourRegisterDecodedInstruction extends DecodedInstruction { this.d = d; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getRegisterCount() { return 4; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getA() { return a; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getB() { return b; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getC() { return c; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getD() { return d; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public DecodedInstruction withIndex(int newIndex) { return new FourRegisterDecodedInstruction(getFormat(), getOpcode(), diff --git a/dx/src/com/android/jack/dx/io/instructions/OneRegisterDecodedInstruction.java b/dx/src/com/android/jack/dx/io/instructions/OneRegisterDecodedInstruction.java index cac4d96..1f1dcf8 100644 --- a/dx/src/com/android/jack/dx/io/instructions/OneRegisterDecodedInstruction.java +++ b/dx/src/com/android/jack/dx/io/instructions/OneRegisterDecodedInstruction.java @@ -40,20 +40,20 @@ public final class OneRegisterDecodedInstruction extends DecodedInstruction { this.a = a; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getRegisterCount() { return 1; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getA() { return a; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public DecodedInstruction withIndex(int newIndex) { return new OneRegisterDecodedInstruction(getFormat(), getOpcode(), diff --git a/dx/src/com/android/jack/dx/io/instructions/PackedSwitchPayloadDecodedInstruction.java b/dx/src/com/android/jack/dx/io/instructions/PackedSwitchPayloadDecodedInstruction.java index 0b2ee32..3eb0889 100644 --- a/dx/src/com/android/jack/dx/io/instructions/PackedSwitchPayloadDecodedInstruction.java +++ b/dx/src/com/android/jack/dx/io/instructions/PackedSwitchPayloadDecodedInstruction.java @@ -41,8 +41,8 @@ public final class PackedSwitchPayloadDecodedInstruction extends DecodedInstruct this.targets = targets; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getRegisterCount() { return 0; } @@ -55,8 +55,8 @@ public final class PackedSwitchPayloadDecodedInstruction extends DecodedInstruct return targets; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public DecodedInstruction withIndex(int newIndex) { throw new UnsupportedOperationException("no index in instruction"); } diff --git a/dx/src/com/android/jack/dx/io/instructions/RegisterRangeDecodedInstruction.java b/dx/src/com/android/jack/dx/io/instructions/RegisterRangeDecodedInstruction.java index eb73d9b..d97fb6b 100644 --- a/dx/src/com/android/jack/dx/io/instructions/RegisterRangeDecodedInstruction.java +++ b/dx/src/com/android/jack/dx/io/instructions/RegisterRangeDecodedInstruction.java @@ -46,20 +46,20 @@ public final class RegisterRangeDecodedInstruction extends DecodedInstruction { this.registerCount = registerCount; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getRegisterCount() { return registerCount; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getA() { return a; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public DecodedInstruction withIndex(int newIndex) { return new RegisterRangeDecodedInstruction(getFormat(), getOpcode(), diff --git a/dx/src/com/android/jack/dx/io/instructions/ShortArrayCodeInput.java b/dx/src/com/android/jack/dx/io/instructions/ShortArrayCodeInput.java index 29e73ce..4f3fba1 100644 --- a/dx/src/com/android/jack/dx/io/instructions/ShortArrayCodeInput.java +++ b/dx/src/com/android/jack/dx/io/instructions/ShortArrayCodeInput.java @@ -36,14 +36,14 @@ public final class ShortArrayCodeInput extends BaseCodeCursor implements CodeInp this.array = array; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public boolean hasMore() { return cursor() < array.length; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int read() throws EOFException { try { int value = array[cursor()]; @@ -54,8 +54,8 @@ public final class ShortArrayCodeInput extends BaseCodeCursor implements CodeInp } } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int readInt() throws EOFException { int short0 = read(); int short1 = read(); @@ -63,8 +63,8 @@ public final class ShortArrayCodeInput extends BaseCodeCursor implements CodeInp return short0 | (short1 << 16); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public long readLong() throws EOFException { long short0 = read(); long short1 = read(); diff --git a/dx/src/com/android/jack/dx/io/instructions/ShortArrayCodeOutput.java b/dx/src/com/android/jack/dx/io/instructions/ShortArrayCodeOutput.java index a1a0cd9..6cbe9c1 100644 --- a/dx/src/com/android/jack/dx/io/instructions/ShortArrayCodeOutput.java +++ b/dx/src/com/android/jack/dx/io/instructions/ShortArrayCodeOutput.java @@ -52,30 +52,30 @@ public final class ShortArrayCodeOutput extends BaseCodeCursor implements CodeOu return result; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void write(short codeUnit) { array[cursor()] = codeUnit; advance(1); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void write(short u0, short u1) { write(u0); write(u1); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void write(short u0, short u1, short u2) { write(u0); write(u1); write(u2); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void write(short u0, short u1, short u2, short u3) { write(u0); write(u1); @@ -83,8 +83,8 @@ public final class ShortArrayCodeOutput extends BaseCodeCursor implements CodeOu write(u3); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void write(short u0, short u1, short u2, short u3, short u4) { write(u0); write(u1); @@ -93,15 +93,15 @@ public final class ShortArrayCodeOutput extends BaseCodeCursor implements CodeOu write(u4); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void writeInt(int value) { write((short) value); write((short) (value >> 16)); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void writeLong(long value) { write((short) value); write((short) (value >> 16)); @@ -109,8 +109,8 @@ public final class ShortArrayCodeOutput extends BaseCodeCursor implements CodeOu write((short) (value >> 48)); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void write(byte[] data) { int value = 0; boolean even = true; @@ -130,24 +130,24 @@ public final class ShortArrayCodeOutput extends BaseCodeCursor implements CodeOu } } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void write(short[] data) { for (short unit : data) { write(unit); } } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void write(int[] data) { for (int i : data) { writeInt(i); } } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void write(long[] data) { for (long l : data) { writeLong(l); diff --git a/dx/src/com/android/jack/dx/io/instructions/SparseSwitchPayloadDecodedInstruction.java b/dx/src/com/android/jack/dx/io/instructions/SparseSwitchPayloadDecodedInstruction.java index 781c12c..6651f4a 100644 --- a/dx/src/com/android/jack/dx/io/instructions/SparseSwitchPayloadDecodedInstruction.java +++ b/dx/src/com/android/jack/dx/io/instructions/SparseSwitchPayloadDecodedInstruction.java @@ -45,8 +45,8 @@ public final class SparseSwitchPayloadDecodedInstruction extends DecodedInstruct this.targets = targets; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getRegisterCount() { return 0; } @@ -59,8 +59,8 @@ public final class SparseSwitchPayloadDecodedInstruction extends DecodedInstruct return targets; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public DecodedInstruction withIndex(int newIndex) { throw new UnsupportedOperationException("no index in instruction"); } diff --git a/dx/src/com/android/jack/dx/io/instructions/ThreeRegisterDecodedInstruction.java b/dx/src/com/android/jack/dx/io/instructions/ThreeRegisterDecodedInstruction.java index c80d827..f92a42f 100644 --- a/dx/src/com/android/jack/dx/io/instructions/ThreeRegisterDecodedInstruction.java +++ b/dx/src/com/android/jack/dx/io/instructions/ThreeRegisterDecodedInstruction.java @@ -50,32 +50,32 @@ public final class ThreeRegisterDecodedInstruction extends DecodedInstruction { this.c = c; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getRegisterCount() { return 3; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getA() { return a; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getB() { return b; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getC() { return c; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public DecodedInstruction withIndex(int newIndex) { return new ThreeRegisterDecodedInstruction(getFormat(), getOpcode(), diff --git a/dx/src/com/android/jack/dx/io/instructions/TwoRegisterDecodedInstruction.java b/dx/src/com/android/jack/dx/io/instructions/TwoRegisterDecodedInstruction.java index 2be0f98..722471d 100644 --- a/dx/src/com/android/jack/dx/io/instructions/TwoRegisterDecodedInstruction.java +++ b/dx/src/com/android/jack/dx/io/instructions/TwoRegisterDecodedInstruction.java @@ -45,26 +45,26 @@ public final class TwoRegisterDecodedInstruction extends DecodedInstruction { this.b = b; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getRegisterCount() { return 2; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getA() { return a; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getB() { return b; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public DecodedInstruction withIndex(int newIndex) { return new TwoRegisterDecodedInstruction(getFormat(), getOpcode(), diff --git a/dx/src/com/android/jack/dx/io/instructions/ZeroRegisterDecodedInstruction.java b/dx/src/com/android/jack/dx/io/instructions/ZeroRegisterDecodedInstruction.java index 443b854..29f7937 100644 --- a/dx/src/com/android/jack/dx/io/instructions/ZeroRegisterDecodedInstruction.java +++ b/dx/src/com/android/jack/dx/io/instructions/ZeroRegisterDecodedInstruction.java @@ -34,14 +34,14 @@ public final class ZeroRegisterDecodedInstruction extends DecodedInstruction { super(format, opcode, index, indexType, target, literal); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int getRegisterCount() { return 0; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public DecodedInstruction withIndex(int newIndex) { return new ZeroRegisterDecodedInstruction(getFormat(), getOpcode(), diff --git a/dx/src/com/android/jack/dx/merge/DexMerger.java b/dx/src/com/android/jack/dx/merge/DexMerger.java index b473a5e..1663983 100644 --- a/dx/src/com/android/jack/dx/merge/DexMerger.java +++ b/dx/src/com/android/jack/dx/merge/DexMerger.java @@ -88,13 +88,12 @@ public final class DexMerger { /** minimum number of wasted bytes before it's worthwhile to compact the result */ private int compactWasteThreshold = 1024 * 1024; // 1MiB - public DexMerger(DexBuffer dexA, DexBuffer dexB, CollisionPolicy collisionPolicy) - throws IOException { + public DexMerger(DexBuffer dexA, DexBuffer dexB, CollisionPolicy collisionPolicy) { this(dexA, dexB, collisionPolicy, new WriterSizes(dexA, dexB)); } private DexMerger(DexBuffer dexA, DexBuffer dexB, CollisionPolicy collisionPolicy, - WriterSizes writerSizes) throws IOException { + WriterSizes writerSizes) { this.dexA = dexA; this.dexB = dexB; this.collisionPolicy = collisionPolicy; diff --git a/dx/src/com/android/jack/dx/rop/code/LocalVariableInfo.java b/dx/src/com/android/jack/dx/rop/code/LocalVariableInfo.java index f476154..5086e47 100644 --- a/dx/src/com/android/jack/dx/rop/code/LocalVariableInfo.java +++ b/dx/src/com/android/jack/dx/rop/code/LocalVariableInfo.java @@ -16,6 +16,7 @@ package com.android.jack.dx.rop.code; +import com.android.jack.dx.rop.type.TypeBearer; import com.android.jack.dx.util.MutabilityControl; import java.util.HashMap; diff --git a/dx/src/com/android/jack/dx/rop/code/RegisterSpec.java b/dx/src/com/android/jack/dx/rop/code/RegisterSpec.java index e9f1474..e332353 100644 --- a/dx/src/com/android/jack/dx/rop/code/RegisterSpec.java +++ b/dx/src/com/android/jack/dx/rop/code/RegisterSpec.java @@ -210,7 +210,7 @@ public final class RegisterSpec implements TypeBearer, ToHuman, Comparable<Regis } /** - * Helper for {@link #equals} and {@link #ForComparison.equals}, + * Helper for {@link #equals} and {@link ForComparison#equals}, * which actually does the test. * * @param reg value of the instance variable, for another instance @@ -261,7 +261,7 @@ public final class RegisterSpec implements TypeBearer, ToHuman, Comparable<Regis } /** - * Helper for {@link #hashCode} and {@link #ForComparison.hashCode}, + * Helper for {@link #hashCode} and {@link ForComparison#hashCode}, * which actually does the calculation. * * @param reg value of the instance variable @@ -615,7 +615,6 @@ public final class RegisterSpec implements TypeBearer, ToHuman, Comparable<Regis * value) which is loaded from or stored to the indicated * register * @param local {@code null-ok;} the associated local variable, if any - * @return {@code non-null;} an appropriately-constructed instance */ public void set(int reg, TypeBearer type, LocalItem local) { this.reg = reg; diff --git a/dx/src/com/android/jack/dx/ssa/BasicRegisterMapper.java b/dx/src/com/android/jack/dx/ssa/BasicRegisterMapper.java index 7093355..14edec8 100644 --- a/dx/src/com/android/jack/dx/ssa/BasicRegisterMapper.java +++ b/dx/src/com/android/jack/dx/ssa/BasicRegisterMapper.java @@ -18,12 +18,13 @@ package com.android.jack.dx.ssa; import com.android.jack.dx.rop.code.RegisterSpec; import com.android.jack.dx.util.IntList; +import com.android.jack.dx.util.ToHuman; /** * This class maps one register space into another, with * each mapping built up individually and added via addMapping() */ -public class BasicRegisterMapper extends RegisterMapper { +public class BasicRegisterMapper extends RegisterMapper implements ToHuman { /** indexed by old register, containing new name */ private IntList oldToNew; @@ -81,7 +82,8 @@ public class BasicRegisterMapper extends RegisterMapper { return oldToNew.get(oldReg); } - /** {@inheritDoc} */ + @Override + /** @inheritDoc */ public String toHuman() { StringBuilder sb = new StringBuilder(); diff --git a/dx/src/com/android/jack/dx/ssa/Dominators.java b/dx/src/com/android/jack/dx/ssa/Dominators.java index 3311efd..1cf4176 100644 --- a/dx/src/com/android/jack/dx/ssa/Dominators.java +++ b/dx/src/com/android/jack/dx/ssa/Dominators.java @@ -153,8 +153,6 @@ public final class Dominators { /** * Performs dominator/post-dominator calculation for the control * flow graph. - * - * @param meth {@code non-null;} method to analyze */ private void run() { SsaBasicBlock root = postdom ? meth.getExitBlock() : meth.getEntryBlock(); diff --git a/dx/src/com/android/jack/dx/ssa/MoveParamCombiner.java b/dx/src/com/android/jack/dx/ssa/MoveParamCombiner.java index 95fc869..29141f0 100644 --- a/dx/src/com/android/jack/dx/ssa/MoveParamCombiner.java +++ b/dx/src/com/android/jack/dx/ssa/MoveParamCombiner.java @@ -105,15 +105,15 @@ if (localA == null) { * Map all uses of specB to specA */ -RegisterMapper mapper = new RegisterMapper() { - /** @inheritDoc */ + RegisterMapper mapper = new RegisterMapper() { @Override + /** @inheritDoc */ public int getNewRegisterCount() { return ssaMeth.getRegCount(); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public RegisterSpec map(RegisterSpec registerSpec) { if (registerSpec.getReg() == specB.getReg()) { return specA; diff --git a/dx/src/com/android/jack/dx/ssa/back/FirstFitAllocator.java b/dx/src/com/android/jack/dx/ssa/back/FirstFitAllocator.java index 3795077..dfcd201 100644 --- a/dx/src/com/android/jack/dx/ssa/back/FirstFitAllocator.java +++ b/dx/src/com/android/jack/dx/ssa/back/FirstFitAllocator.java @@ -42,7 +42,6 @@ public class FirstFitAllocator extends RegisterAllocator { /** indexed by old reg; the set of old regs we've mapped */ private final BitSet mapped; - /** {@inheritDoc} */ public FirstFitAllocator(final SsaMethod ssaMeth, final InterferenceGraph interference) { super(ssaMeth, interference); diff --git a/dx/src/com/android/jack/dx/ssa/back/NullRegisterAllocator.java b/dx/src/com/android/jack/dx/ssa/back/NullRegisterAllocator.java index 051a159..09748e0 100644 --- a/dx/src/com/android/jack/dx/ssa/back/NullRegisterAllocator.java +++ b/dx/src/com/android/jack/dx/ssa/back/NullRegisterAllocator.java @@ -26,13 +26,13 @@ import com.android.jack.dx.ssa.SsaMethod; * about normal or wide categories. Used for debugging. */ public class NullRegisterAllocator extends RegisterAllocator { - /** {@inheritDoc} */ + public NullRegisterAllocator(SsaMethod ssaMeth, InterferenceGraph interference) { super(ssaMeth, interference); } - /** {@inheritDoc} */ @Override + /** {@inheritDoc} */ public boolean wantsParamsMovedHigh() { // We're not smart enough for this. return false; diff --git a/dx/src/com/android/jack/dx/ssa/back/SsaToRop.java b/dx/src/com/android/jack/dx/ssa/back/SsaToRop.java index 9d984f9..013c0f0 100644 --- a/dx/src/com/android/jack/dx/ssa/back/SsaToRop.java +++ b/dx/src/com/android/jack/dx/ssa/back/SsaToRop.java @@ -72,7 +72,7 @@ public class SsaToRop { /** * Constructs an instance. * - * @param ssaMeth {@code non-null;} method to process + * @param ssaMethod {@code non-null;} method to process * @param minimizeRegisters {@code true} if the converter should * attempt to minimize the rop-form register count */ diff --git a/dx/src/com/android/jack/dx/util/BitIntSet.java b/dx/src/com/android/jack/dx/util/BitIntSet.java index b19a387..ead375d 100644 --- a/dx/src/com/android/jack/dx/util/BitIntSet.java +++ b/dx/src/com/android/jack/dx/util/BitIntSet.java @@ -35,8 +35,8 @@ public class BitIntSet implements IntSet { bits = Bits.makeBitSet(max); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void add(int value) { ensureCapacity(value); Bits.set(bits, value, true); @@ -55,22 +55,22 @@ public class BitIntSet implements IntSet { } } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void remove(int value) { if (value < Bits.getMax(bits)) { Bits.set(bits, value, false); } } - /** @inheritDoc */ @Override + /** @inheritDoc */ public boolean has(int value) { return (value < Bits.getMax(bits)) && Bits.get(bits, value); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void merge(IntSet other) { if (other instanceof BitIntSet) { BitIntSet o = (BitIntSet) other; @@ -94,26 +94,26 @@ public class BitIntSet implements IntSet { } } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int elements() { return Bits.bitCount(bits); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public IntIterator iterator() { return new IntIterator() { private int idx = Bits.findFirst(bits, 0); - /** @inheritDoc */ @Override + /** @inheritDoc */ public boolean hasNext() { return idx >= 0; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int next() { if (!hasNext()) { throw new NoSuchElementException(); @@ -128,8 +128,8 @@ public class BitIntSet implements IntSet { }; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/dx/src/com/android/jack/dx/util/ByteArray.java b/dx/src/com/android/jack/dx/util/ByteArray.java index e696542..29d9ca5 100644 --- a/dx/src/com/android/jack/dx/util/ByteArray.java +++ b/dx/src/com/android/jack/dx/util/ByteArray.java @@ -242,7 +242,7 @@ public final class ByteArray { /** * Gets a {@code DataInputStream} that reads from this instance, * with the cursor starting at the beginning of this instance's data. - * <b>Note:</b> The returned instance may be cast to {@link #GetCursor} + * <b>Note:</b> The returned instance may be cast to {@link GetCursor} * if needed. * * @return {@code non-null;} an appropriately-constructed @@ -255,7 +255,7 @@ public final class ByteArray { /** * Gets a {@code InputStream} that reads from this instance, * with the cursor starting at the beginning of this instance's data. - * <b>Note:</b> The returned instance may be cast to {@link #GetCursor} + * <b>Note:</b> The returned instance may be cast to {@link GetCursor} * if needed. * * @return {@code non-null;} an appropriately-constructed @@ -343,7 +343,7 @@ public final class ByteArray { /** * Helper class for {@link #makeDataInputStream}. This is used - * simply so that the cursor of a wrapped {@link #MyInputStream} + * simply so that the cursor of a wrapped {@link MyInputStream} * instance may be easily determined. */ public static class MyDataInputStream extends DataInputStream { diff --git a/dx/src/com/android/jack/dx/util/LabeledList.java b/dx/src/com/android/jack/dx/util/LabeledList.java index 3432e2c..3579dbf 100644 --- a/dx/src/com/android/jack/dx/util/LabeledList.java +++ b/dx/src/com/android/jack/dx/util/LabeledList.java @@ -28,7 +28,6 @@ public class LabeledList extends FixedSizeList { */ private final IntList labelToIndex; - /** @inheritDoc */ public LabeledList(int size) { super(size); @@ -141,8 +140,8 @@ public class LabeledList extends FixedSizeList { return result; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void shrinkToFit() { super.shrinkToFit(); diff --git a/dx/src/com/android/jack/dx/util/ListIntSet.java b/dx/src/com/android/jack/dx/util/ListIntSet.java index bae44e8..908aa0c 100644 --- a/dx/src/com/android/jack/dx/util/ListIntSet.java +++ b/dx/src/com/android/jack/dx/util/ListIntSet.java @@ -34,8 +34,8 @@ public class ListIntSet implements IntSet { ints.sort(); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void add(int value) { int index = ints.binarysearch(value); @@ -44,8 +44,8 @@ public class ListIntSet implements IntSet { } } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void remove(int value) { int index = ints.indexOf(value); @@ -54,14 +54,14 @@ public class ListIntSet implements IntSet { } } - /** @inheritDoc */ @Override + /** @inheritDoc */ public boolean has(int value) { return ints.indexOf(value) >= 0; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public void merge(IntSet other) { if (other instanceof ListIntSet) { ListIntSet o = (ListIntSet) other; @@ -103,26 +103,26 @@ public class ListIntSet implements IntSet { } } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int elements() { return ints.size(); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public IntIterator iterator() { return new IntIterator() { private int idx = 0; - /** @inheritDoc */ @Override + /** @inheritDoc */ public boolean hasNext() { return idx < ints.size(); } - /** @inheritDoc */ @Override + /** @inheritDoc */ public int next() { if (!hasNext()) { throw new NoSuchElementException(); @@ -133,8 +133,8 @@ public class ListIntSet implements IntSet { }; } - /** @inheritDoc */ @Override + /** @inheritDoc */ public String toString() { return ints.toString(); } |