summaryrefslogtreecommitdiffstats
path: root/dx
diff options
context:
space:
mode:
authormikaelpeltier <mikaelpeltier@google.com>2014-04-17 15:44:54 +0200
committermikaelpeltier <mikaelpeltier@google.com>2014-04-17 15:44:54 +0200
commitef3644eadcdb00435fedad8ca2f81c08851d9649 (patch)
tree0961223fa9832628055ef796f4f044d5cad20aeb /dx
parent7da7b7cd206f6319c95bc53be489067f6690e350 (diff)
downloadtoolchain_jack-ef3644eadcdb00435fedad8ca2f81c08851d9649.zip
toolchain_jack-ef3644eadcdb00435fedad8ca2f81c08851d9649.tar.gz
toolchain_jack-ef3644eadcdb00435fedad8ca2f81c08851d9649.tar.bz2
Suppress warnings in package com/android/jack/dx/dex/
Change-Id: I19d044336c35889b7d0b4fb6607fb2dbe49744d7
Diffstat (limited to 'dx')
-rw-r--r--dx/src/com/android/jack/dx/dex/TableOfContents.java9
-rw-r--r--dx/src/com/android/jack/dx/dex/code/PositionList.java2
-rw-r--r--dx/src/com/android/jack/dx/dex/code/RopTranslator.java29
-rw-r--r--dx/src/com/android/jack/dx/dex/code/StdCatchBuilder.java2
-rw-r--r--dx/src/com/android/jack/dx/dex/file/AnnotationItem.java2
-rw-r--r--dx/src/com/android/jack/dx/dex/file/FieldAnnotationStruct.java2
-rw-r--r--dx/src/com/android/jack/dx/dex/file/ImportedCodeItem.java9
-rw-r--r--dx/src/com/android/jack/dx/dex/file/ImportedDebugInfoItem.java1
-rw-r--r--dx/src/com/android/jack/dx/dex/file/MethodAnnotationStruct.java2
-rw-r--r--dx/src/com/android/jack/dx/dex/file/MixedItemSection.java4
-rw-r--r--dx/src/com/android/jack/dx/dex/file/ParameterAnnotationStruct.java2
-rw-r--r--dx/src/com/android/jack/dx/dex/file/StringIdItem.java3
12 files changed, 18 insertions, 49 deletions
diff --git a/dx/src/com/android/jack/dx/dex/TableOfContents.java b/dx/src/com/android/jack/dx/dex/TableOfContents.java
index 40f6e98..408dd29 100644
--- a/dx/src/com/android/jack/dx/dex/TableOfContents.java
+++ b/dx/src/com/android/jack/dx/dex/TableOfContents.java
@@ -20,7 +20,6 @@ import com.android.jack.dx.io.DexBuffer;
import com.android.jack.dx.util.DexException;
import java.io.IOException;
-import java.io.UnsupportedEncodingException;
import java.util.Arrays;
/**
@@ -81,13 +80,13 @@ public final class TableOfContents {
signature = new byte[20];
}
- public void readFrom(DexBuffer buffer) throws IOException {
+ public void readFrom(DexBuffer buffer) {
readHeader(buffer.open(0));
readMap(buffer.open(mapList.off));
computeSizesFromOffsets();
}
- private void readHeader(DexBuffer.Section headerIn) throws UnsupportedEncodingException {
+ private void readHeader(DexBuffer.Section headerIn) {
byte[] magic = headerIn.readByteArray(8);
int apiTarget = DexFormat.magicToApi(magic);
@@ -128,7 +127,7 @@ public final class TableOfContents {
dataOff = headerIn.readInt();
}
- private void readMap(DexBuffer.Section in) throws IOException {
+ private void readMap(DexBuffer.Section in) {
int mapSize = in.readInt();
Section previous = null;
for (int i = 0; i < mapSize; i++) {
@@ -205,7 +204,7 @@ public final class TableOfContents {
out.writeInt(dataOff);
}
- public void writeMap(DexBuffer.Section out) throws IOException {
+ public void writeMap(DexBuffer.Section out) {
int count = 0;
for (Section section : sections) {
if (section.exists()) {
diff --git a/dx/src/com/android/jack/dx/dex/code/PositionList.java b/dx/src/com/android/jack/dx/dex/code/PositionList.java
index 9b4eedb..3869b6e 100644
--- a/dx/src/com/android/jack/dx/dex/code/PositionList.java
+++ b/dx/src/com/android/jack/dx/dex/code/PositionList.java
@@ -81,7 +81,7 @@ public final class PositionList extends FixedSizeList {
DalvInsn insn = insns.get(i);
if (insn instanceof CodeAddress) {
- lastWasTarget = true;;
+ lastWasTarget = true;
continue;
}
diff --git a/dx/src/com/android/jack/dx/dex/code/RopTranslator.java b/dx/src/com/android/jack/dx/dex/code/RopTranslator.java
index ef0b7f6..16c43b2 100644
--- a/dx/src/com/android/jack/dx/dex/code/RopTranslator.java
+++ b/dx/src/com/android/jack/dx/dex/code/RopTranslator.java
@@ -155,9 +155,9 @@ public final class RopTranslator {
this.output = new OutputCollector(dexOptions, maxInsns, bsz * 3, regCount);
if (locals != null) {
- this.translationVisitor = new LocalVariableAwareTranslationVisitor(output, locals);
+ this.translationVisitor = new LocalVariableAwareTranslationVisitor();
} else {
- this.translationVisitor = new TranslationVisitor(output);
+ this.translationVisitor = new TranslationVisitor();
}
}
@@ -475,9 +475,6 @@ regs = RegisterSpecList.make(regs.get(1), regs.get(0));
* Instruction visitor class for doing the instruction translation per se.
*/
private class TranslationVisitor implements Insn.Visitor {
- /** {@code non-null;} list of output instructions in-progress */
- private final OutputCollector output;
-
/** {@code non-null;} basic block being worked on */
private BasicBlock block;
@@ -488,15 +485,6 @@ regs = RegisterSpecList.make(regs.get(1), regs.get(0));
private CodeAddress lastAddress;
/**
- * Constructs an instance.
- *
- * @param output {@code non-null;} destination for instruction output
- */
- public TranslationVisitor(OutputCollector output) {
- this.output = output;
- }
-
- /**
* Sets the block currently being worked on.
*
* @param block {@code non-null;} the block
@@ -782,19 +770,6 @@ RegisterSpec dest = insn.getResult();
* local variable tracking
*/
private class LocalVariableAwareTranslationVisitor extends TranslationVisitor {
- /** {@code non-null;} local variable info */
- private LocalVariableInfo locals;
-
- /**
- * Constructs an instance.
- *
- * @param output {@code non-null;} destination for instruction output
- * @param locals {@code non-null;} the local variable info
- */
- public LocalVariableAwareTranslationVisitor(OutputCollector output, LocalVariableInfo locals) {
- super(output);
- this.locals = locals;
- }
/** {@inheritDoc} */
@Override
diff --git a/dx/src/com/android/jack/dx/dex/code/StdCatchBuilder.java b/dx/src/com/android/jack/dx/dex/code/StdCatchBuilder.java
index 04c6e0b..07c63c3 100644
--- a/dx/src/com/android/jack/dx/dex/code/StdCatchBuilder.java
+++ b/dx/src/com/android/jack/dx/dex/code/StdCatchBuilder.java
@@ -256,7 +256,7 @@ public final class StdCatchBuilder implements CatchBuilder {
}
/**
- * Makes a {@link CatchTable#Entry} for the given block range and
+ * Makes a {@link CatchTable.Entry} for the given block range and
* handlers.
*
* @param start {@code non-null;} the start block for the range (inclusive)
diff --git a/dx/src/com/android/jack/dx/dex/file/AnnotationItem.java b/dx/src/com/android/jack/dx/dex/file/AnnotationItem.java
index c7394c9..e11264c 100644
--- a/dx/src/com/android/jack/dx/dex/file/AnnotationItem.java
+++ b/dx/src/com/android/jack/dx/dex/file/AnnotationItem.java
@@ -44,7 +44,7 @@ public final class AnnotationItem extends OffsettedItem {
/** the required alignment for instances of this class */
private static final int ALIGNMENT = 1;
- /** {@code non-null;} unique instance of {@link #TypeIdSorter} */
+ /** {@code non-null;} unique instance of {@link TypeIdSorter} */
private static final TypeIdSorter TYPE_ID_SORTER = new TypeIdSorter();
/** {@code non-null;} the annotation to represent */
diff --git a/dx/src/com/android/jack/dx/dex/file/FieldAnnotationStruct.java b/dx/src/com/android/jack/dx/dex/file/FieldAnnotationStruct.java
index afe4c56..23fb729 100644
--- a/dx/src/com/android/jack/dx/dex/file/FieldAnnotationStruct.java
+++ b/dx/src/com/android/jack/dx/dex/file/FieldAnnotationStruct.java
@@ -73,7 +73,6 @@ public final class FieldAnnotationStruct implements ToHuman, Comparable<FieldAnn
return field.compareTo(other.field);
}
- /** {@inheritDoc} */
public void addContents(DexFile file) {
FieldIdsSection fieldIds = file.getFieldIds();
MixedItemSection wordData = file.getWordData();
@@ -82,7 +81,6 @@ public final class FieldAnnotationStruct implements ToHuman, Comparable<FieldAnn
annotations = wordData.intern(annotations);
}
- /** {@inheritDoc} */
public void writeTo(DexFile file, AnnotatedOutput out) {
int fieldIdx = file.getFieldIds().indexOf(field);
int annotationsOff = annotations.getAbsoluteOffset();
diff --git a/dx/src/com/android/jack/dx/dex/file/ImportedCodeItem.java b/dx/src/com/android/jack/dx/dex/file/ImportedCodeItem.java
index 09d368b..caf79f5 100644
--- a/dx/src/com/android/jack/dx/dex/file/ImportedCodeItem.java
+++ b/dx/src/com/android/jack/dx/dex/file/ImportedCodeItem.java
@@ -23,6 +23,7 @@ import com.android.jack.dx.io.CodeReader;
import com.android.jack.dx.io.Opcodes;
import com.android.jack.dx.io.instructions.DecodedInstruction;
import com.android.jack.dx.io.instructions.ShortArrayCodeOutput;
+import com.android.jack.dx.rop.cst.Constant;
import com.android.jack.dx.rop.cst.CstIndexMap;
import com.android.jack.dx.rop.cst.CstMethodRef;
import com.android.jack.dx.util.AnnotatedOutput;
@@ -327,7 +328,7 @@ public final class ImportedCodeItem extends OffsettedItem implements
}
/**
- * {@link CodeReader.Visitor} remapping instructions using string index.
+ * {@link com.android.jack.dx.io.CodeReader.Visitor} remapping instructions using string index.
*/
private class StringRemapper implements CodeReader.Visitor {
@@ -351,7 +352,7 @@ public final class ImportedCodeItem extends OffsettedItem implements
}
/**
- * {@link CodeReader.Visitor} remapping instructions using field index.
+ * {@link com.android.jack.dx.io.CodeReader.Visitor} remapping instructions using field index.
*/
private class FieldRemapper implements CodeReader.Visitor {
@@ -369,7 +370,7 @@ public final class ImportedCodeItem extends OffsettedItem implements
}
/**
- * {@link CodeReader.Visitor} remapping instructions using type index.
+ * {@link com.android.jack.dx.io.CodeReader.Visitor} remapping instructions using type index.
*/
private class TypeRemapper implements CodeReader.Visitor {
@@ -387,7 +388,7 @@ public final class ImportedCodeItem extends OffsettedItem implements
}
/**
- * {@link CodeReader.Visitor} remapping instructions using method index.
+ * {@link com.android.jack.dx.io.CodeReader.Visitor} remapping instructions using method index.
*/
private class MethodRemapper implements CodeReader.Visitor {
diff --git a/dx/src/com/android/jack/dx/dex/file/ImportedDebugInfoItem.java b/dx/src/com/android/jack/dx/dex/file/ImportedDebugInfoItem.java
index 4219ebb..d787c85 100644
--- a/dx/src/com/android/jack/dx/dex/file/ImportedDebugInfoItem.java
+++ b/dx/src/com/android/jack/dx/dex/file/ImportedDebugInfoItem.java
@@ -28,6 +28,7 @@ import static com.android.jack.dx.dex.file.DebugInfoConstants.DBG_START_LOCAL;
import static com.android.jack.dx.dex.file.DebugInfoConstants.DBG_START_LOCAL_EXTENDED;
import com.android.jack.dx.io.DexBuffer;
+import com.android.jack.dx.rop.cst.Constant;
import com.android.jack.dx.rop.cst.CstIndexMap;
import com.android.jack.dx.util.AnnotatedOutput;
diff --git a/dx/src/com/android/jack/dx/dex/file/MethodAnnotationStruct.java b/dx/src/com/android/jack/dx/dex/file/MethodAnnotationStruct.java
index a12fa0f..a01882f 100644
--- a/dx/src/com/android/jack/dx/dex/file/MethodAnnotationStruct.java
+++ b/dx/src/com/android/jack/dx/dex/file/MethodAnnotationStruct.java
@@ -73,7 +73,6 @@ public final class MethodAnnotationStruct implements ToHuman, Comparable<MethodA
return method.compareTo(other.method);
}
- /** {@inheritDoc} */
public void addContents(DexFile file) {
MethodIdsSection methodIds = file.getMethodIds();
MixedItemSection wordData = file.getWordData();
@@ -82,7 +81,6 @@ public final class MethodAnnotationStruct implements ToHuman, Comparable<MethodA
annotations = wordData.intern(annotations);
}
- /** {@inheritDoc} */
public void writeTo(DexFile file, AnnotatedOutput out) {
int methodIdx = file.getMethodIds().indexOf(method);
int annotationsOff = annotations.getAbsoluteOffset();
diff --git a/dx/src/com/android/jack/dx/dex/file/MixedItemSection.java b/dx/src/com/android/jack/dx/dex/file/MixedItemSection.java
index ad45a50..68909b1 100644
--- a/dx/src/com/android/jack/dx/dex/file/MixedItemSection.java
+++ b/dx/src/com/android/jack/dx/dex/file/MixedItemSection.java
@@ -47,8 +47,8 @@ public final class MixedItemSection extends Section {
TYPE,
/** sort in class-major order, with instances sorted per-class */
- INSTANCE;
- };
+ INSTANCE
+ }
/** {@code non-null;} sorter which sorts instances by type */
private static final Comparator<OffsettedItem> TYPE_SORTER = new Comparator<OffsettedItem>() {
diff --git a/dx/src/com/android/jack/dx/dex/file/ParameterAnnotationStruct.java b/dx/src/com/android/jack/dx/dex/file/ParameterAnnotationStruct.java
index c8ad228..da4ebc9 100644
--- a/dx/src/com/android/jack/dx/dex/file/ParameterAnnotationStruct.java
+++ b/dx/src/com/android/jack/dx/dex/file/ParameterAnnotationStruct.java
@@ -97,7 +97,6 @@ int size = annotationsList.size();
return method.compareTo(other.method);
}
- /** {@inheritDoc} */
public void addContents(DexFile file) {
MethodIdsSection methodIds = file.getMethodIds();
MixedItemSection wordData = file.getWordData();
@@ -106,7 +105,6 @@ int size = annotationsList.size();
wordData.add(annotationsItem);
}
- /** {@inheritDoc} */
public void writeTo(DexFile file, AnnotatedOutput out) {
int methodIdx = file.getMethodIds().indexOf(method);
int annotationsOff = annotationsItem.getAbsoluteOffset();
diff --git a/dx/src/com/android/jack/dx/dex/file/StringIdItem.java b/dx/src/com/android/jack/dx/dex/file/StringIdItem.java
index 5d2e74a..c42f264 100644
--- a/dx/src/com/android/jack/dx/dex/file/StringIdItem.java
+++ b/dx/src/com/android/jack/dx/dex/file/StringIdItem.java
@@ -65,8 +65,7 @@ public final class StringIdItem extends IndexedItem implements Comparable<String
/** {@inheritDoc} */
@Override
public int compareTo(StringIdItem other) {
- StringIdItem otherString = (StringIdItem) other;
- return value.compareTo(otherString.value);
+ return value.compareTo(other.value);
}
/** {@inheritDoc} */