Code cleanup - remove some unused methods and trailing whitespace

git-svn-id: https://svn.apache.org/repos/asf/harmony/enhanced/java/trunk@996798 13f79535-47bb-0310-9956-ffa450edef68
master
Sian January 14 years ago
parent 743eb4d225
commit fcc17bda44
  1. 10
      src/main/java/org/apache/harmony/pack200/Archive.java
  2. 18
      src/main/java/org/apache/harmony/pack200/CpBands.java
  3. 22
      src/main/java/org/apache/harmony/pack200/Pack200Exception.java
  4. 2
      src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java

@ -146,7 +146,7 @@ public class Archive {
List classes = new ArrayList(); List classes = new ArrayList();
List files = new ArrayList(); List files = new ArrayList();
long segmentLimit = options.getSegmentLimit(); long segmentLimit = options.getSegmentLimit();
int size = packingFileList.size(); int size = packingFileList.size();
PackingFile packingFile; PackingFile packingFile;
for (int index = 0; index < size; index++) { for (int index = 0; index < size; index++) {
@ -221,9 +221,9 @@ public class Archive {
static class SegmentUnit { static class SegmentUnit {
private List classList; private final List classList;
private List fileList; private final List fileList;
private int byteAmount = 0; private int byteAmount = 0;
@ -323,6 +323,10 @@ public class Archive {
public boolean isDirectory(){ public boolean isDirectory(){
return isDirectory; return isDirectory;
} }
public String toString() {
return name;
}
} }
} }

@ -151,28 +151,28 @@ public class CpBands extends BandSet {
cpUtf8BigChars[i][j] = ((Character) bigChars.remove(0)).charValue(); cpUtf8BigChars[i][j] = ((Character) bigChars.remove(0)).charValue();
} }
} }
byte[] encodedBand = encodeBandInt("cpUtf8Prefix", cpUtf8Prefix, Codec.DELTA5); byte[] encodedBand = encodeBandInt("cpUtf8Prefix", cpUtf8Prefix, Codec.DELTA5);
out.write(encodedBand); out.write(encodedBand);
PackingUtils.log("Wrote " + encodedBand.length PackingUtils.log("Wrote " + encodedBand.length
+ " bytes from cpUtf8Prefix[" + cpUtf8Prefix.length + "]"); + " bytes from cpUtf8Prefix[" + cpUtf8Prefix.length + "]");
encodedBand = encodeBandInt("cpUtf8Suffix", cpUtf8Suffix, Codec.UNSIGNED5); encodedBand = encodeBandInt("cpUtf8Suffix", cpUtf8Suffix, Codec.UNSIGNED5);
out.write(encodedBand); out.write(encodedBand);
PackingUtils.log("Wrote " + encodedBand.length PackingUtils.log("Wrote " + encodedBand.length
+ " bytes from cpUtf8Suffix[" + cpUtf8Suffix.length + "]"); + " bytes from cpUtf8Suffix[" + cpUtf8Suffix.length + "]");
encodedBand = encodeBandInt("cpUtf8Chars", cpUtf8Chars, Codec.CHAR3); encodedBand = encodeBandInt("cpUtf8Chars", cpUtf8Chars, Codec.CHAR3);
out.write(encodedBand); out.write(encodedBand);
PackingUtils.log("Wrote " + encodedBand.length PackingUtils.log("Wrote " + encodedBand.length
+ " bytes from cpUtf8Chars[" + cpUtf8Chars.length + "]"); + " bytes from cpUtf8Chars[" + cpUtf8Chars.length + "]");
encodedBand = encodeBandInt("cpUtf8BigSuffix", cpUtf8BigSuffix, encodedBand = encodeBandInt("cpUtf8BigSuffix", cpUtf8BigSuffix,
Codec.DELTA5); Codec.DELTA5);
out.write(encodedBand); out.write(encodedBand);
PackingUtils.log("Wrote " + encodedBand.length PackingUtils.log("Wrote " + encodedBand.length
+ " bytes from cpUtf8BigSuffix[" + cpUtf8BigSuffix.length + "]"); + " bytes from cpUtf8BigSuffix[" + cpUtf8BigSuffix.length + "]");
for (int i = 0; i < cpUtf8BigChars.length; i++) { for (int i = 0; i < cpUtf8BigChars.length; i++) {
encodedBand = encodeBandInt("cpUtf8BigChars " + i, encodedBand = encodeBandInt("cpUtf8BigChars " + i,
cpUtf8BigChars[i], Codec.DELTA5); cpUtf8BigChars[i], Codec.DELTA5);
@ -238,7 +238,7 @@ public class CpBands extends BandSet {
out.write(encodedBand); out.write(encodedBand);
PackingUtils.log("Wrote " + encodedBand.length PackingUtils.log("Wrote " + encodedBand.length
+ " bytes from cp_Long_hi[" + highBits.length + "]"); + " bytes from cp_Long_hi[" + highBits.length + "]");
encodedBand = encodeBandInt("cp_Long_lo", loBits, Codec.DELTA5); encodedBand = encodeBandInt("cp_Long_lo", loBits, Codec.DELTA5);
out.write(encodedBand); out.write(encodedBand);
PackingUtils.log("Wrote " + encodedBand.length PackingUtils.log("Wrote " + encodedBand.length
@ -262,7 +262,7 @@ public class CpBands extends BandSet {
out.write(encodedBand); out.write(encodedBand);
PackingUtils.log("Wrote " + encodedBand.length PackingUtils.log("Wrote " + encodedBand.length
+ " bytes from cp_Double_hi[" + highBits.length + "]"); + " bytes from cp_Double_hi[" + highBits.length + "]");
encodedBand = encodeBandInt("cp_Double_lo", loBits, Codec.DELTA5); encodedBand = encodeBandInt("cp_Double_lo", loBits, Codec.DELTA5);
out.write(encodedBand); out.write(encodedBand);
PackingUtils.log("Wrote " + encodedBand.length PackingUtils.log("Wrote " + encodedBand.length
@ -317,13 +317,13 @@ public class CpBands extends BandSet {
for (int j = 0; j < cpSignatureClasses.length; j++) { for (int j = 0; j < cpSignatureClasses.length; j++) {
cpSignatureClasses[j] = ((CPClass) classes.get(j)).getIndex(); cpSignatureClasses[j] = ((CPClass) classes.get(j)).getIndex();
} }
byte[] encodedBand = encodeBandInt("cpSignatureForm", cpSignatureForm, byte[] encodedBand = encodeBandInt("cpSignatureForm", cpSignatureForm,
Codec.DELTA5); Codec.DELTA5);
out.write(encodedBand); out.write(encodedBand);
PackingUtils.log("Wrote " + encodedBand.length PackingUtils.log("Wrote " + encodedBand.length
+ " bytes from cpSignatureForm[" + cpSignatureForm.length + "]"); + " bytes from cpSignatureForm[" + cpSignatureForm.length + "]");
encodedBand = encodeBandInt("cpSignatureClasses", cpSignatureClasses, encodedBand = encodeBandInt("cpSignatureClasses", cpSignatureClasses,
Codec.UDELTA5); Codec.UDELTA5);
out.write(encodedBand); out.write(encodedBand);

@ -33,26 +33,4 @@ public class Pack200Exception extends Exception {
super(message); super(message);
} }
/**
* Create a new Pack200 exception with the given message and cause
*
* @param message
* the text message to display
* @param cause
* the {@link Throwable} that caused this problem
*/
public Pack200Exception(String message, Throwable cause) {
super(message, cause);
}
/**
* Create a new Pack200 exception with the given cause
*
* @param cause
* the {@link Throwable} that caused this problem
*/
public Pack200Exception(Throwable cause) {
super(cause);
}
} }

@ -115,8 +115,6 @@ public class ClassConstantPool {
// children now become parents // children now become parents
parents.clear(); parents.clear();
parents.addAll(children); parents.addAll(children);
} }
} }

Loading…
Cancel
Save