You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by sj...@apache.org on 2008/01/29 16:54:05 UTC

svn commit: r616407 [1/4] - in /harmony/enhanced/classlib/trunk/modules/pack200/src: main/java/org/apache/harmony/pack200/ main/java/org/apache/harmony/pack200/bytecode/ main/java/org/apache/harmony/pack200/bytecode/forms/ main/java5/org/apache/harmony...

Author: sjanuary
Date: Tue Jan 29 07:53:23 2008
New Revision: 616407

URL: http://svn.apache.org/viewvc?rev=616407&view=rev
Log:
Applying slightly modified version of the patch for HARMONY-5401 (Code cleanup)

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Codec.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CodecEncoding.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/FileBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IcTuple.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/MetadataBandGroup.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200Exception.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentConstantPool.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentOptions.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentUtils.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/AnnotationDefaultAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/AnnotationsAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/Attribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/BCIRenumberedAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ByteCode.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPClass.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPConstant.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPDouble.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPFieldRef.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPFloat.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPInteger.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPInterfaceMethodRef.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPLong.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMember.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPNameAndType.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPRef.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPString.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPUTF8.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ClassConstantPool.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ClassFileEntry.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ClassPoolSet.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CodeAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ConstantPoolEntry.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ConstantValueAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/EnclosingMethodAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ExceptionTableEntry.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ExceptionsAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/InnerClassesAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/LineNumberTableAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/LocalVariableTableAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/LocalVariableTypeTableAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/NewAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/OperandManager.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/RuntimeVisibleorInvisibleParameterAnnotationsAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/SignatureAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ByteCodeForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ClassRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ClassSpecificReferenceForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/DoubleForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/FieldRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/IMethodRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/IincForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/InitMethodReferenceForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/IntRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/LabelForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/LocalForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/LongForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/LookupSwitchForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/MultiANewArrayForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/NewInitMethodRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/NoArgumentForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ReferenceForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ShortForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/SingleByteReferenceForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/StringRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/SuperFieldRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/SuperInitMethodRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/SuperMethodRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/SwitchForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/TableSwitchForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ThisFieldRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ThisMethodRefForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/VariableInstructionForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/WideForm.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200Adapter.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200UnpackerAdapter.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/AbstractBandsTestCase.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/AttributeLayoutMapTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/AttributeLayoutTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/BHSDCodecTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/BandSetTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/BcBandsTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ClassBandsTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/CodeAttributeTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/CodecEncodingTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/CodecTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ICTupleTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/PopulationCodecTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentConstantPoolTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentOptionsTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/bytecode/ClassFileEntryTest.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java Tue Jan 29 07:53:23 2008
@@ -26,14 +26,14 @@
 
     private int[] attributeDefinitionHeader;
 
-    private String[] attributeDefinitionLayout;    
+    private String[] attributeDefinitionLayout;
 
     private String[] attributeDefinitionName;
 
     private AttributeLayoutMap attributeDefinitionMap;
 
     private String[] cpUTF8;
-    
+
     public AttrDefinitionBands(Segment segment) {
         super(segment);
         this.cpUTF8 = segment.getCpBands().getCpUTF8();
@@ -51,9 +51,9 @@
                 Codec.UNSIGNED5, attributeDefinitionCount, cpUTF8);
         attributeDefinitionLayout = parseReferences("attr_definition_layout",
                 in, Codec.UNSIGNED5, attributeDefinitionCount, cpUTF8);
-        
+
         attributeDefinitionMap = new AttributeLayoutMap();
-        
+
         int overflowIndex = 32;
         if(segment.getSegmentHeader().getOptions().hasClassFlagsHi()) {
             overflowIndex = 63;

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java Tue Jan 29 07:53:23 2008
@@ -87,8 +87,8 @@
 		}
 		throw new Pack200Exception("Unknown layout encoding: " + layout);
 	}
-    
-    
+
+
     private int context;
 
     private int index;
@@ -96,11 +96,11 @@
 	private final String layout;
 
 	private long mask;
-    
+
     private String name;
     private boolean isDefault;
     private int backwardsCallCount;
-    
+
 
     /**
      * Construct a default AttributeLayout
@@ -115,7 +115,7 @@
 			throws Pack200Exception {
 		this(name, context, layout, index, true);
 	}
-    
+
     public AttributeLayout(String name, int context, String layout, int index,
             boolean isDefault) throws Pack200Exception {
         super();
@@ -138,8 +138,8 @@
         this.layout = layout;
         this.isDefault = isDefault;
     }
-    
-    
+
+
 	public boolean equals(Object obj) {
 		if (this == obj)
 			return true;
@@ -153,7 +153,7 @@
 				return false;
 		} else if (!layout.equals(other.layout))
 			return false;
-        if(index != other.index) 
+        if(index != other.index)
             return false;
         if(context != other.context)
             return false;
@@ -258,7 +258,7 @@
     public String getName() {
         return name;
     }
-    
+
     public int numBackwardsCallables() {
         if(layout == "*") {
             return 1;

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java Tue Jan 29 07:53:23 2008
@@ -26,7 +26,7 @@
  * internationalized, and should not be translated.
  */
 public class AttributeLayoutMap {
-    
+
 	// Create all the default AttributeLayouts here
 	private static AttributeLayout[] getDefaultAttributeLayouts()
 			throws Pack200Exception {
@@ -193,13 +193,13 @@
     private final Map fieldLayouts = new HashMap();
     private final Map methodLayouts = new HashMap();
     private final Map codeLayouts = new HashMap();
-    
+
     // The order of the maps in this array should not be changed as their indices correspond to
     // the value of their context constants (AttributeLayout.CONTEXT_CLASS etc.)
     private final Map[] layouts = new Map[] {classLayouts, fieldLayouts, methodLayouts, codeLayouts};
 
     private final Map layoutsToBands = new HashMap();
-    
+
 	public AttributeLayoutMap() throws Pack200Exception {
 		AttributeLayout[] defaultAttributeLayouts = getDefaultAttributeLayouts();
 		for (int i = 0; i < defaultAttributeLayouts.length; i++) {
@@ -210,7 +210,7 @@
 	public void add(AttributeLayout layout) {
         layouts[layout.getContext()].put(new Integer(layout.getIndex()), layout);
 	}
-    
+
 
 
     public void add(AttributeLayout layout, NewAttributeBands newBands) {
@@ -225,21 +225,21 @@
             AttributeLayout layout = (AttributeLayout) iter.next();
             if(layout.getName().equals(name)) {
                 return layout;
-            }            
+            }
         }
         return null;
 	}
-    
+
     public AttributeLayout getAttributeLayout(int index, int context)
             throws Pack200Exception {
         Map map = layouts[context];
         return (AttributeLayout) map.get(new Integer(index));
     }
-    
+
     /**
      * The map should not contain the same layout and name combination more than
      * once for each context.
-     * @throws Pack200Exception 
+     * @throws Pack200Exception
      *
      */
     public void checkMap() throws Pack200Exception {
@@ -271,5 +271,5 @@
     public NewAttributeBands getAttributeBands(AttributeLayout layout) {
         return (NewAttributeBands) layoutsToBands.get(layout);
     }
-    
+
 }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java Tue Jan 29 07:53:23 2008
@@ -25,7 +25,7 @@
 /**
  * TODO Comment -- quite a lot can be nicked from Codec, since this was created
  * from it
- *  
+ *
  */
 public final class BHSDCodec extends Codec {
 
@@ -53,12 +53,12 @@
 	 * Represents signed numbers or not (0=unsigned,1/2=signed)
 	 */
 	private int s;
-    
+
     private long cardinality;
 
 	/**
 	 * Constructs an unsigned, non-delta Codec with the given B and H values.
-	 * 
+	 *
 	 * @param b
 	 *            the maximum number of bytes that a value can be encoded as
 	 *            [1..5]
@@ -71,7 +71,7 @@
 
 	/**
 	 * Constructs a non-delta Codec with the given B, H and S values.
-	 * 
+	 *
 	 * @param b
 	 *            the maximum number of bytes that a value can be encoded as
 	 *            [1..5]
@@ -87,7 +87,7 @@
 
 	/**
 	 * Constructs a Codec with the given B, H, S and D values.
-	 * 
+	 *
 	 * @param b
 	 *            the maximum number of bytes that a value can be encoded as
 	 *            [1..5]
@@ -128,14 +128,14 @@
 	/**
 	 * Returns the cardinality of this codec; that is, the number of distinct
 	 * values that it can contain.
-	 * 
+	 *
 	 * @return the cardinality of this codec
 	 */
 	public long cardinality() {
 		return cardinality;
 	}
 
-	
+
 	public long decode(InputStream in) throws IOException, Pack200Exception {
 		if (d != 0)
 			throw new Pack200Exception(
@@ -143,7 +143,7 @@
 		return decode(in, 0);
 	}
 
-	
+
 	public long decode(InputStream in, long last) throws IOException,
 			Pack200Exception {
 		int n = 0;
@@ -172,10 +172,10 @@
             double twoPowSMinusOne = twoPowS-1;
             if(u % twoPowS < twoPowSMinusOne) {
                 if(cardinality < Math.pow(2, 32)) {
-                    z = (long) (u - (Math.floor(u/ twoPowS)));                    
+                    z = (long) (u - (Math.floor(u/ twoPowS)));
                 } else {
                     z = cast32((long) (u - (Math.floor(u/ twoPowS))));
-                }                
+                }
             } else {
                 z = (long) (-Math.floor(u/ twoPowS) - 1);
             }
@@ -196,7 +196,7 @@
 
     /**
 	 * True if this encoding can code the given value
-	 * 
+	 *
 	 * @param value
 	 *            the value to check
 	 * @return <code>true</code> if the encoding can encode this value
@@ -204,7 +204,7 @@
 	public boolean encodes(long value) {
 		return (value >= smallest() && value <= largest());
 	}
-    
+
     public byte[] encode(long value, long last) throws Pack200Exception {
         if (isDelta()) {
             value -= last;
@@ -267,7 +267,7 @@
 
 	/**
 	 * Returns the largest value that this codec can represent.
-	 * 
+	 *
 	 * @return the largest value that this codec can represent.
 	 */
 	public long largest() {
@@ -287,7 +287,7 @@
 	}
 	/**
 	 * Returns the smallest value that this codec can represent.
-	 * 
+	 *
 	 * @return the smallest value that this codec can represent.
 	 */
 	public long smallest() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java Tue Jan 29 07:53:23 2008
@@ -35,11 +35,11 @@
 import org.apache.harmony.pack200.bytecode.ClassConstantPool;
 
 public abstract class BandSet {
-    
+
     public abstract void unpack(InputStream inputStream) throws IOException, Pack200Exception;
-    
+
     protected Segment segment;
-    
+
     protected SegmentHeader header;
 
     public BandSet(Segment segment) {
@@ -49,7 +49,7 @@
 
     /**
      * Decode a band and return an array of <code>int</code> values
-     * 
+     *
      * @param name
      *            the name of the band (primarily for logging/debugging
      *            purposes)
@@ -81,7 +81,7 @@
 
     /**
      * Decode a band and return an array of <code>int[]</code> values
-     * 
+     *
      * @param name
      *            the name of the band (primarily for logging/debugging
      *            purposes)
@@ -117,10 +117,10 @@
         }
         return result;
     }
-    
+
     /**
      * Decode a band and return an array of <code>long</code> values
-     * 
+     *
      * @param name
      *            the name of the band (primarily for logging/debugging
      *            purposes)
@@ -172,7 +172,7 @@
         }
         return baos.toByteArray();
     }
-    
+
     public long[] parseFlags(String name, InputStream in, int count,
             BHSDCodec codec, boolean hasHi) throws IOException,
             Pack200Exception {
@@ -209,11 +209,11 @@
         int[] lo;
         if(hiCodec != null) {
             hi = decodeBandLong(name, in, hiCodec, sum);
-            lo = decodeBandInt(name, in, loCodec, sum);        
+            lo = decodeBandInt(name, in, loCodec, sum);
         } else {
             lo = decodeBandInt(name, in, loCodec, sum);
         }
-        
+
         int index = 0;
         for (int i = 0; i < result.length; i++) {
             for (int j = 0; j < result[i].length; j++) {
@@ -228,16 +228,16 @@
 
         // TODO Remove debugging code
         debug("Parsed *" + name + " (" + result.length + ")");
-        return result;        
+        return result;
     }
-    
+
     /**
      * Helper method to parse <i>count</i> references from <code>in</code>,
      * using <code>codec</code> to decode the values as indexes into
      * <code>reference</code> (which is populated prior to this call). An
      * exception is thrown if a decoded index falls outside the range
      * [0..reference.length-1].
-     * 
+     *
      * @param name
      *            the band name
      * @param in
@@ -249,7 +249,7 @@
      * @param reference
      *            the array of values to use for the indexes; often
      *            {@link #cpUTF8}
-     * 
+     *
      * @throws IOException
      *             if a problem occurs during reading from the underlying stream
      * @throws Pack200Exception
@@ -262,7 +262,7 @@
         return parseReferences(name, in, codec, new int[] { count },
                 reference)[0];
     }
-    
+
     /**
      * Helper method to parse <i>count</i> references from <code>in</code>,
      * using <code>codec</code> to decode the values as indexes into
@@ -270,7 +270,7 @@
      * exception is thrown if a decoded index falls outside the range
      * [0..reference.length-1]. Unlike the other parseReferences, this
      * post-processes the result into an array of results.
-     * 
+     *
      * @param name
      *            TODO
      * @param in
@@ -282,7 +282,7 @@
      * @param reference
      *            the array of values to use for the indexes; often
      *            {@link #cpUTF8}
-     * 
+     *
      * @throws IOException
      *             if a problem occurs during reading from the underlying stream
      * @throws Pack200Exception
@@ -328,7 +328,7 @@
         long[] band;
         Codec codecUsed = codec;
         if (codec.getB() == 1 || count == 0) {
-            band = codec.decode(count, in);           
+            band = codec.decode(count, in);
         } else {
             long[] getFirst = codec.decode(1, in);
             if (getFirst.length == 0) {
@@ -339,7 +339,7 @@
                 // Non-default codec should be used
                 codecUsed = CodecEncoding.getCodec((int) (-1 - first),
                         header.getBandHeadersInputStream(), codec);
-                band = codecUsed.decode(count, in);          
+                band = codecUsed.decode(count, in);
             } else if (!codec.isSigned() && first >= codec.getL()
                     && first <= codec.getL() + 255) {
                 // Non-default codec should be used
@@ -356,7 +356,7 @@
         for (int i = 0; i < returnBand.length; i++) {
             returnBand[i] = (int)band[i];
         }
-        
+
         /*
          * Note - this is not in the spec, but seems to be used as an
          * optimization by the RI for bands where the minimum and maximum values
@@ -392,7 +392,7 @@
                 }
             }
         }
-        
+
         return returnBand;
     }
 
@@ -401,7 +401,7 @@
      * class. It will be removed before going into production. If the property
      * 'debug.pack200' is set, this will generate messages to stderr; otherwise,
      * it will be silent.
-     * 
+     *
      * @param message
      * @deprecated this should be removed from production code
      */
@@ -410,7 +410,7 @@
     }
 
     public CPInteger[] parseCPIntReferences(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        int[] reference = segment.getCpBands().getCpInt();        
+        int[] reference = segment.getCpBands().getCpInt();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPInteger[] result = new CPInteger[indices.length];
         for (int i1 = 0; i1 < count; i1++) {
@@ -424,7 +424,7 @@
     }
 
     public CPDouble[] parseCPDoubleReferences(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        double[] reference = segment.getCpBands().getCpDouble();        
+        double[] reference = segment.getCpBands().getCpDouble();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPDouble[] result = new CPDouble[indices.length];
         for (int i1 = 0; i1 < count; i1++) {
@@ -438,7 +438,7 @@
     }
 
     public CPFloat[] parseCPFloatReferences(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        float[] reference = segment.getCpBands().getCpFloat();       
+        float[] reference = segment.getCpBands().getCpFloat();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPFloat[] result = new CPFloat[indices.length];
         for (int i1 = 0; i1 < count; i1++) {
@@ -452,7 +452,7 @@
     }
 
     public CPLong[] parseCPLongReferences(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        long[] reference = segment.getCpBands().getCpLong();        
+        long[] reference = segment.getCpBands().getCpLong();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPLong[] result = new CPLong[indices.length];
         for (int i1 = 0; i1 < count; i1++) {
@@ -464,9 +464,9 @@
         }
         return result;
     }
-    
+
     public CPUTF8[] parseCPUTF8References(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        String[] reference = segment.getCpBands().getCpUTF8();        
+        String[] reference = segment.getCpBands().getCpUTF8();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPUTF8[] result = new CPUTF8[indices.length];
         for (int i1 = 0; i1 < count; i1++) {
@@ -481,7 +481,7 @@
 
 
     public CPUTF8[][] parseCPUTF8References(String name, InputStream in, BHSDCodec codec, int[] counts) throws IOException, Pack200Exception {
-        String[] reference = segment.getCpBands().getCpUTF8();        
+        String[] reference = segment.getCpBands().getCpUTF8();
         CPUTF8[][] result = new CPUTF8[counts.length][];
         int sum = 0;
         for (int i = 0; i < counts.length; i++) {
@@ -509,7 +509,7 @@
     }
 
     public CPString[] parseCPStringReferences(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        String[] reference = segment.getCpBands().getCpString();        
+        String[] reference = segment.getCpBands().getCpString();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPString[] result = new CPString[indices.length];
         for (int i1 = 0; i1 < count; i1++) {
@@ -538,7 +538,7 @@
     }
 
     public CPMethodRef[] parseCPMethodRefReferences(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        String[] reference = segment.getCpBands().getCpMethodClass();        
+        String[] reference = segment.getCpBands().getCpMethodClass();
         String[] descriptors = segment.getCpBands().getCpMethodDescriptor();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPMethodRef[] result = new CPMethodRef[indices.length];
@@ -553,7 +553,7 @@
     }
 
     public CPFieldRef[] parseCPFieldRefReferences(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        String[] reference = segment.getCpBands().getCpFieldClass();        
+        String[] reference = segment.getCpBands().getCpFieldClass();
         String[] descriptors = segment.getCpBands().getCpFieldDescriptor();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPFieldRef[] result = new CPFieldRef[indices.length];
@@ -568,7 +568,7 @@
     }
 
     public CPNameAndType[] parseCPDescriptorReferences(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        String[] reference = segment.getCpBands().getCpDescriptor();        
+        String[] reference = segment.getCpBands().getCpDescriptor();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPNameAndType[] result = new CPNameAndType[indices.length];
         for (int i1 = 0; i1 < count; i1++) {
@@ -582,7 +582,7 @@
     }
 
     public CPUTF8[] parseCPSignatureReferences(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        String[] reference = segment.getCpBands().getCpSignature();        
+        String[] reference = segment.getCpBands().getCpSignature();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPUTF8[] result = new CPUTF8[indices.length];
         for (int i1 = 0; i1 < count; i1++) {
@@ -596,7 +596,7 @@
     }
 
     public CPClass[] parseCPClassReferences(String name, InputStream in, BHSDCodec codec, int count) throws IOException, Pack200Exception {
-        String[] reference = segment.getCpBands().getCpClass();        
+        String[] reference = segment.getCpBands().getCpClass();
         int[] indices = decodeBandInt(name, in, codec, count, reference.length - 1);
         CPClass[] result = new CPClass[indices.length];
         for (int i1 = 0; i1 < count; i1++) {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java Tue Jan 29 07:53:23 2008
@@ -37,7 +37,7 @@
 
     // The bytecodes for each method in each class as they come (i.e. in their packed format)
     private byte[][][] methodByteCodePacked;
-    
+
     // The bands
     // TODO:  Haven't resolved references yet.  Do we want to?
     private int[] bcCaseCount;
@@ -77,7 +77,7 @@
      */
     public void unpack(InputStream in) throws IOException,
             Pack200Exception {
-        
+
        AttributeLayoutMap attributeDefinitionMap = segment.getAttrDefinitionBands().getAttributeDefinitionMap();
        int classCount = header.getClassCount();
        long[][] methodFlags = segment.getClassBands().getMethodFlags();
@@ -85,7 +85,7 @@
        int[] codeMaxStack = segment.getClassBands().getCodeMaxStack();
        ArrayList[][] methodAttributes = segment.getClassBands().getMethodAttributes();
        String[][] methodDescr = segment.getClassBands().getMethodDescr();
-       
+
        int bcCaseCountCount = 0;
        int bcByteCount = 0;
        int bcShortCount = 0;
@@ -96,14 +96,14 @@
        int bcLongRefCount = 0;
        int bcDoubleRefCount = 0;
        int bcStringRefCount = 0;
-       int bcClassRefCount = 0;       
+       int bcClassRefCount = 0;
        int bcFieldRefCount = 0;
        int bcMethodRefCount = 0;
        int bcIMethodRefCount = 0;
        int bcThisFieldCount = 0;
        int bcSuperFieldCount = 0;
        int bcThisMethodCount = 0;
-       int bcSuperMethodCount = 0;       
+       int bcSuperMethodCount = 0;
        int bcInitRefCount = 0;
        int bcEscCount = 0;
        int bcEscRefCount = 0;
@@ -119,7 +119,7 @@
                        AttributeLayout.CONTEXT_METHOD);
        methodByteCodePacked = new byte[classCount][][];
        int bcParsed = 0;
-       
+
        List switchIsTableSwitch = new ArrayList();
        List wideByteCodes = new ArrayList();
        for (int c = 0; c < classCount; c++) {
@@ -367,7 +367,7 @@
 
         int i = 0;
         ArrayList orderedCodeAttributes = segment.getClassBands().getOrderedCodeAttributes();
-        
+
         // Exception table fields
         int[] handlerCount = segment.getClassBands().getCodeHandlerCount();
         int[][] handlerStartPCs = segment.getClassBands().getCodeHandlerStartP();
@@ -421,7 +421,7 @@
            }
        }
     }
-    
+
     private boolean startsWithIf(int codePacked) {
         return (codePacked >= 153 && codePacked <= 166)
         || (codePacked == 198)

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java Tue Jan 29 07:53:23 2008
@@ -114,7 +114,7 @@
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.apache.harmony.pack200.BandSet#unpack(java.io.InputStream)
      */
     public void unpack(InputStream in) throws IOException, Pack200Exception {
@@ -157,7 +157,7 @@
                 AttributeLayout.CONTEXT_FIELD);
         int[] fieldAttrCalls = decodeBandInt("field_attr_calls", in,
                 Codec.UNSIGNED5, callCount);
-        
+
         // Assign empty field attributes
         fieldAttributes = new ArrayList[classCount][];
         for (int i = 0; i < classCount; i++) {
@@ -185,7 +185,7 @@
         int signatureIndex = 0;
 
         int backwardsCallsUsed = parseFieldMetadataBands(in, fieldAttrCalls);
-        
+
         // Parse non-predefined attribute bands
         int backwardsCallIndex = backwardsCallsUsed;
         int limit = options.hasFieldFlagsHi() ? 62 : 31;
@@ -202,7 +202,7 @@
         }
         for (int i = 0; i < counts.length; i++) {
             if(counts[i] > 0) {
-                NewAttributeBands bands = attrMap.getAttributeBands(otherLayouts[i]);                
+                NewAttributeBands bands = attrMap.getAttributeBands(otherLayouts[i]);
                 otherAttributes[i] = bands.parseAttributes(in, counts[i]);
                 int numBackwardsCallables = otherLayouts[i].numBackwardsCallables();
                 if(numBackwardsCallables > 0) {
@@ -259,7 +259,7 @@
     private void parseMethodBands(InputStream in) throws IOException,
             Pack200Exception {
         methodDescr = parseReferences("method_descr", in, Codec.MDELTA5,
-                classMethodCount, cpBands.getCpDescriptor());        
+                classMethodCount, cpBands.getCpDescriptor());
         parseMethodAttrBands(in);
     }
 
@@ -275,7 +275,7 @@
                 AttributeLayout.CONTEXT_METHOD);
         methodAttrCalls = decodeBandInt("code_attr_calls", in, Codec.UNSIGNED5,
                 callCount);
-        
+
         // assign empty method attributes
         methodAttributes = new ArrayList[classCount][];
         for (int i = 0; i < classCount; i++) {
@@ -293,7 +293,7 @@
                 Codec.UNSIGNED5, count);
         String[][] methodExceptionsRS = parseReferences("method_Exceptions_RC",
                 in, Codec.UNSIGNED5, numExceptions, cpBands.getCpClass());
-        
+
         // Parse method signature attributes
         AttributeLayout methodSignatureLayout = attrMap.getAttributeLayout(
                 AttributeLayout.ATTRIBUTE_SIGNATURE,
@@ -301,10 +301,10 @@
         int count1 = SegmentUtils.countMatches(methodFlags, methodSignatureLayout);
         long[] methodSignatureRS = decodeBandLong("method_signature_RS", in,
                 Codec.UNSIGNED5, count1);
-        
+
         // Parse method metadata bands
-        int backwardsCallsUsed = parseMethodMetadataBands(in, methodAttrCalls);        
-        
+        int backwardsCallsUsed = parseMethodMetadataBands(in, methodAttrCalls);
+
         // Parse non-predefined attribute bands
         int backwardsCallIndex = backwardsCallsUsed;
         int limit = options.hasMethodFlagsHi() ? 62 : 31;
@@ -321,7 +321,7 @@
         }
         for (int i = 0; i < counts.length; i++) {
             if(counts[i] > 0) {
-                NewAttributeBands bands = attrMap.getAttributeBands(otherLayouts[i]);                
+                NewAttributeBands bands = attrMap.getAttributeBands(otherLayouts[i]);
                 otherAttributes[i] = bands.parseAttributes(in, counts[i]);
                 int numBackwardsCallables = otherLayouts[i].numBackwardsCallables();
                 if(numBackwardsCallables > 0) {
@@ -414,7 +414,7 @@
         for (int i = 0; i < classCount; i++) {
             classAttributes[i] = new ArrayList();
         }
-        
+
         classFlags = parseFlags("class_flags", in, classCount, Codec.UNSIGNED5,
                 options.hasClassFlagsHi());
         int classAttrCount = SegmentUtils.countBit16(classFlags);
@@ -512,7 +512,7 @@
         }
         for (int i = 0; i < counts.length; i++) {
             if(counts[i] > 0) {
-                NewAttributeBands bands = attrMap.getAttributeBands(otherLayouts[i]);                
+                NewAttributeBands bands = attrMap.getAttributeBands(otherLayouts[i]);
                 otherAttributes[i] = bands.parseAttributes(in, counts[i]);
                 int numBackwardsCallables = otherLayouts[i].numBackwardsCallables();
                 if(numBackwardsCallables > 0) {
@@ -750,7 +750,7 @@
                 .getAttributeLayout(
                         AttributeLayout.ATTRIBUTE_LOCAL_VARIABLE_TYPE_TABLE,
                         AttributeLayout.CONTEXT_CODE);
-        
+
         int lengthLocalVariableNBand = SegmentUtils.countMatches(codeFlags,
                 localVariableTableLayout);
         int[] localVariableTableN = decodeBandInt("code_LocalVariableTable_N",
@@ -786,7 +786,7 @@
                 }
             }
         }
-        
+
         int lengthLocalVariableTypeTableNBand = SegmentUtils.countMatches(
                 codeFlags, localVariableTypeTableLayout);
         int[] localVariableTypeTableN = decodeBandInt(
@@ -824,7 +824,7 @@
         }
         for (int i = 0; i < counts.length; i++) {
             if(counts[i] > 0) {
-                NewAttributeBands bands = attrMap.getAttributeBands(otherLayouts[i]);                
+                NewAttributeBands bands = attrMap.getAttributeBands(otherLayouts[i]);
                 otherAttributes[i] = bands.parseAttributes(in, counts[i]);
                 int numBackwardsCallables = otherLayouts[i].numBackwardsCallables();
                 if(numBackwardsCallables > 0) {
@@ -834,7 +834,7 @@
                     backwardsCallIndex+= numBackwardsCallables;
                 }
             }
-        }     
+        }
 
         int lineNumberIndex = 0;
         int lvtIndex = 0;
@@ -879,7 +879,7 @@
                 }
             }
         }
-        
+
     }
 
     private CPUTF8[][] stringsToCPUTF8(String[][] strings) {
@@ -892,7 +892,7 @@
         }
         return cpUTF8s;
     }
-    
+
 
 
     private CPUTF8[] stringsToCPUTF8(String[] strings) {
@@ -934,7 +934,7 @@
         Iterator rvaAttributesIterator = mb[0].getAttributes().iterator();
         Iterator riaAttributesIterator = mb[1].getAttributes().iterator();
         for (int i = 0; i < fieldFlags.length; i++) {
-            for (int j = 0; j < fieldFlags[i].length; j++) {                
+            for (int j = 0; j < fieldFlags[i].length; j++) {
                 if(rvaLayout.matches(fieldFlags[i][j])) {
                     fieldAttributes[i][j].add(rvaAttributesIterator.next());
                 }
@@ -969,7 +969,7 @@
                         pairCount += mbg[i].pair_N[j][k];
                     }
                 }
-                
+
                 mbg[i].name_RU = stringsToCPUTF8(parseReferences(contextName + "_" + rxa
                         + "_name_RU", in, Codec.UNSIGNED5, pairCount, cpBands.getCpUTF8()));
             }
@@ -1195,7 +1195,7 @@
     /**
      * Answer an ArrayList of ArrayLists which hold the the code attributes
      * corresponding to all classes in order.
-     * 
+     *
      * If a class doesn't have any attributes, the corresponding element in this
      * list will be an empty ArrayList.
      * @return ArrayList
@@ -1229,7 +1229,7 @@
      * Returns null if all classes should use the default major and minor
      * version or an array of integers containing the major version numberss to
      * use for each class in the segment
-     * 
+     *
      * @return Class file major version numbers, or null if none specified
      */
     public int[] getClassVersionMajor() {
@@ -1240,7 +1240,7 @@
      * Returns null if all classes should use the default major and minor
      * version or an array of integers containing the minor version numberss to
      * use for each class in the segment
-     * 
+     *
      * @return Class file minor version numbers, or null if none specified
      */
     public int[] getClassVersionMinor() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Codec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Codec.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Codec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Codec.java Tue Jan 29 07:53:23 2008
@@ -31,7 +31,7 @@
  * as a sequence of 10x1s. This allows the absolute value of a coded integer to
  * fall outside of the 'small number' range, whilst still being encoded as a
  * single byte.
- * 
+ *
  * A codec is configured with four parameters:
  * <dl>
  * <dt>B</dt>
@@ -65,7 +65,7 @@
  * instance of the Codec to be cloned for each use.)
  * <dt>
  * </dl>
- * 
+ *
  * Codecs are notated as (B,H,S,D) and either D or S,D may be omitted if zero.
  * Thus {@link #BYTE1} is denoted (1,256,0,0) or (1,256). The
  * {@link #toString()} method prints out the condensed form of the encoding.
@@ -74,24 +74,24 @@
  * {@link #UNSIGNED5}) are unsigned; otherwise, in most cases, they are signed.
  * The presence of the word Delta ({@link #DELTA5}, {@link #UDELTA5})
  * indicates a delta encoding is used.
- * 
+ *
  * This codec is really quite cool for storing compressed information, and could
  * be used entirely separately from the Pack200 implementation for efficient
  * transfer of integer data if required.
- * 
+ *
  * Note that all information is byte-oriented; for decoding float/double
  * information, the bit values are converted (not cast) into a long type. Note
  * that long values are used throughout even though most may be cast to ints;
  * this is primarily to avoid having to worry about signed values, even if it
  * would be more efficient to do so.
- * 
+ *
  * There are a number of standard codecs ({@link #UDELTA5}, {@link #UNSIGNED5},
  * {@link #BYTE1}, {@link #CHAR3}) that are used in the implementation of many
  * bands; but there are a variety of other ones, and indeed the specification
  * assumes that other combinations of values can result in more specific and
  * efficient formats. There are also a sequence of canonical encodings defined
  * by the Pack200 specification, which allow a codec to be referred to by
- * canonical number. {@link CodecEncoding#canonicalCodec}) 
+ * canonical number. {@link CodecEncoding#canonicalCodec})
  */
 public abstract class Codec {
 	/**
@@ -149,7 +149,7 @@
 	 * Decode a sequence of bytes from the given input stream, returning the
 	 * value as a long. Note that this method can only be applied for non-delta
 	 * encodings.
-	 * 
+	 *
 	 * @param in
 	 *            the input stream to read from
 	 * @return the value as a long
@@ -168,7 +168,7 @@
 	 * previous value must be passed in as a parameter. If it is a non-delta
 	 * encoding, then it does not matter what value is passed in, so it makes
 	 * sense for the value to be passed in by default using code similar to:
-	 * 
+	 *
 	 * <pre>
 	 * long last = 0;
 	 * while (condition) {
@@ -176,7 +176,7 @@
 	 * 	// do something with last
 	 * }
 	 * </pre>
-	 * 
+	 *
 	 * @param in
 	 *            the input stream to read from
 	 * @param last
@@ -198,7 +198,7 @@
 	 * This should probably be used in most cases, since some codecs
 	 * (such as @{link PopCodec}) only work when the number of values
 	 * to be read is known.
-	 * 
+	 *
 	 * @param n
 	 *            the number of values to decode
 	 * @param in
@@ -221,10 +221,10 @@
 		}
 		return result;
 	}
-    
+
     /**
      * Decodes a sequence of <code>n</code> values from <code>in</code>.
-     * 
+     *
      * @param n
      *            the number of values to decode
      * @param in

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CodecEncoding.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CodecEncoding.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CodecEncoding.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CodecEncoding.java Tue Jan 29 07:53:23 2008
@@ -40,7 +40,7 @@
 			new BHSDCodec(5, 16, 2), new BHSDCodec(5, 32), new BHSDCodec(5, 32, 1),
 			new BHSDCodec(5, 32, 2), new BHSDCodec(5, 64), new BHSDCodec(5, 64, 1),
 			new BHSDCodec(5, 64, 2), new BHSDCodec(5, 128), new BHSDCodec(5, 128, 1),
-			new BHSDCodec(5, 128, 2), new BHSDCodec(5, 4, 0, 1), 
+			new BHSDCodec(5, 128, 2), new BHSDCodec(5, 4, 0, 1),
 			new BHSDCodec(5, 4, 1, 1), new BHSDCodec(5, 4, 2, 1),
 			new BHSDCodec(5, 16, 0, 1), new BHSDCodec(5, 16, 1, 1),
 			new BHSDCodec(5, 16, 2, 1), new BHSDCodec(5, 32, 0, 1),
@@ -80,7 +80,7 @@
 			new BHSDCodec(4, 240, 0, 1), new BHSDCodec(4, 240, 1, 1),
 			new BHSDCodec(4, 248, 0, 1), new BHSDCodec(4, 248, 1, 1) };
 
-	/** 
+	/**
 	 * Returns the codec specified by the given value byte and optional byte header.
 	 * If the value is >=116, then bytes may be consumed from the secondary input
 	 * stream, which is taken to be the contents of the band_headers byte array.
@@ -91,17 +91,17 @@
 	 * @param in the input stream to read additional byte headers from
 	 * @param defaultCodec TODO
 	 * @return the corresponding codec, or <code>null</code> if the default should be used
-	 * @throws IOException 
+	 * @throws IOException
 	 * @throws IOException if there is a problem reading from the input stream (which
 	 * in reality, is never, since the band_headers are likely stored in a byte array
 	 * and accessed via a ByteArrayInputStream. However, an EOFException could occur
 	 * if things go wrong)
-	 * @throws Pack200Exception 
+	 * @throws Pack200Exception
 	 */
 	public static Codec getCodec(int value, InputStream in, Codec defaultCodec) throws IOException, Pack200Exception {
 		// Sanity check to make sure that no-one has changed
 		// the canonical codecs, which would really cause havoc
-		if (canonicalCodec.length != 116) 
+		if (canonicalCodec.length != 116)
 			throw new Error("Canonical encodings have been incorrectly modified");
 		if (value < 0) {
 			throw new IllegalArgumentException(
@@ -122,7 +122,7 @@
 				throw new EOFException("End of buffer read whilst trying to decode codec");
 			int h = code + 1;
 			// This handles the special cases for invalid combinations of data.
-			return new BHSDCodec(b,h,s,d);			
+			return new BHSDCodec(b,h,s,d);
 		} else if (value >= 117 && value <= 140) { // Run codec
 			int offset = value - 117;
 			int kx = offset & 3;
@@ -138,17 +138,17 @@
 			if (adef) {
 				aCodec = defaultCodec;
 			} else {
-				aCodec = getCodec(in.read(),in,defaultCodec); 
+				aCodec = getCodec(in.read(),in,defaultCodec);
 			}
 			if (bdef) {
 				bCodec = defaultCodec;
 			} else {
-				bCodec = getCodec(in.read(),in,defaultCodec); 
+				bCodec = getCodec(in.read(),in,defaultCodec);
 			}
 			return new RunCodec(k,aCodec,bCodec);
 		} else if (value >= 141 && value <= 188) { // Population Codec
 			int offset = value - 141;
-			boolean fdef = (offset & 1) == 1; 
+			boolean fdef = (offset & 1) == 1;
 			boolean udef = (offset >> 1 & 1) == 1;
 			int tdefl = offset >> 2;
 			boolean tdef = tdefl != 0;

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java Tue Jan 29 07:53:23 2008
@@ -21,11 +21,11 @@
 import java.util.ArrayList;
 
 public class CpBands extends BandSet {
-    
+
     public SegmentConstantPool getConstantPool() {
         return pool;
     }
-    
+
 
     private final SegmentConstantPool pool = new SegmentConstantPool(this);
 
@@ -59,11 +59,11 @@
 
     private String[] cpUTF8;
 
-    
+
     public CpBands(Segment segment) {
         super(segment);
     }
-    
+
     public void unpack(InputStream in) throws IOException, Pack200Exception {
         parseCpUtf8(in);
         parseCpInt(in);
@@ -78,11 +78,11 @@
         parseCpMethod(in);
         parseCpIMethod(in);
     }
-    
+
     /**
      * Parses the constant pool class names, using {@link #cpClassCount} to
      * populate {@link #cpClass} from {@link #cpUTF8}.
-     * 
+     *
      * @param in
      *            the input stream to read from
      * @throws IOException
@@ -106,7 +106,7 @@
      * largely to make it easier for representing field and method descriptors
      * (e.g. <code>out:java.lang.PrintStream</code>) in a way that is
      * compatible with passing String arrays.
-     * 
+     *
      * @param in
      *            the input stream to read from
      * @throws IOException
@@ -144,7 +144,7 @@
     /**
      * Parses the constant pool field definitions, using {@link #cpFieldCount}
      * to populate {@link #cpFieldClass} and {@link #cpFieldDescriptor}.
-     * 
+     *
      * @param in
      *            the input stream to read from
      * @throws IOException
@@ -177,7 +177,7 @@
      * Parses the constant pool interface method definitions, using
      * {@link #cpIMethodCount} to populate {@link #cpIMethodClass} and
      * {@link #cpIMethodDescriptor}.
-     * 
+     *
      * @param in
      *            the input stream to read from
      * @throws IOException
@@ -211,7 +211,7 @@
     /**
      * Parses the constant pool method definitions, using {@link #cpMethodCount}
      * to populate {@link #cpMethodClass} and {@link #cpMethodDescriptor}.
-     * 
+     *
      * @param in
      *            the input stream to read from
      * @throws IOException
@@ -242,7 +242,7 @@
      * representation identical to the bytecode equivalent
      * <code>[Ljava/lang/String;(V)</code> TODO Check that the form is as
      * above and update other types e.g. J
-     * 
+     *
      * @param in
      *            the input stream to read from
      * @throws IOException
@@ -291,7 +291,7 @@
     /**
      * Parses the constant pool strings, using {@link #cpStringCount} to
      * populate {@link #cpString} from indexes into {@link #cpUTF8}.
-     * 
+     *
      * @param in
      *            the input stream to read from
      * @throws IOException
@@ -308,7 +308,7 @@
 
     private void parseCpUtf8(InputStream in) throws IOException,
             Pack200Exception {
-        int cpUTF8Count = header.getCpUTF8Count();        
+        int cpUTF8Count = header.getCpUTF8Count();
         cpUTF8 = new String[cpUTF8Count];
         cpUTF8[0] = ""; //$NON-NLS-1$
         int[] prefix = decodeBandInt("cpUTF8Prefix", in, Codec.DELTA5, cpUTF8Count-2);
@@ -327,14 +327,14 @@
         int[] dataBand = decodeBandInt("cp_Utf8_chars", in, Codec.CHAR3, charCount);
         for (int i = 0; i < data.length; i++) {
             data[i] = (char) dataBand[i];
-        } 
-        
+        }
+
         // Read in the big suffix data
         int[] bigSuffixCounts = decodeBandInt("cp_Utf8_big_suffix", in, Codec.DELTA5, bigSuffixCount);
         int[][] bigSuffixDataBand = decodeBandInt("cp_Utf8_big_chars", in, Codec.DELTA5, bigSuffixCounts);
-        
+
         // Convert big suffix data to characters
-        char bigSuffixData[][] = new char[bigSuffixCount][];        
+        char bigSuffixData[][] = new char[bigSuffixCount][];
         for (int i = 0; i < bigSuffixDataBand.length; i++) {
             bigSuffixData[i] = new char[bigSuffixDataBand[i].length];
             for (int j = 0; j < bigSuffixDataBand[i].length; j++) {
@@ -358,7 +358,7 @@
             }
         }
     }
-    
+
     public String[] getCpClass() {
         return cpClass;
     }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/FileBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/FileBands.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/FileBands.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/FileBands.java Tue Jan 29 07:53:23 2008
@@ -42,7 +42,7 @@
     private String[] cpUTF8;
 
     private InputStream in;
-    
+
     /**
      * @param header
      */
@@ -77,7 +77,7 @@
         }
         this.in = in; // store for use by processFileBits(), which is called later
     }
-    
+
     // TODO: stream the file bits directly somehow
     public void processFileBits() throws IOException,
             Pack200Exception {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java Tue Jan 29 07:53:23 2008
@@ -29,7 +29,7 @@
  * Pack200 Inner Class Bands
  */
 public class IcBands extends BandSet {
-    
+
 
     private IcTuple[] icAll;
 
@@ -61,7 +61,7 @@
                 outerClasses, cpClass);
         String[] icName = parseReferences("ic_name", in, Codec.DELTA5, outerClasses,
                 cpUTF8);
-        
+
         // Construct IC tuples
         icAll = new IcTuple[icThisClass.length];
         int index = 0;
@@ -136,7 +136,7 @@
                 }
             }
         }
-        
+
         IcTuple[] result = new IcTuple[relevantTuples.size()];
         for(int index=0; index < result.length; index++) {
             result[index] = (IcTuple)relevantTuples.get(index);
@@ -144,5 +144,5 @@
         }
         return result;
     }
-  
+
 }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IcTuple.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IcTuple.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IcTuple.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IcTuple.java Tue Jan 29 07:53:23 2008
@@ -31,7 +31,7 @@
     private boolean initialized = false;
     private boolean anonymous = false;
     private boolean member = true;
-    
+
     /**
      * Answer true if the receiver is predicted;
      * answer false if the receiver is specified
@@ -44,7 +44,7 @@
 
     /**
      * Break the receiver into components at $ boundaries.
-     * 
+     *
      * @return
      */
     public String[] innerBreakAtDollar(String className) {
@@ -68,7 +68,7 @@
         }
         return result;
     }
-    
+
     /**
      * Answer the outer class name for the receiver.
      * This may either be specified or inferred from
@@ -81,7 +81,7 @@
         }
         return cachedOuterClassString;
     }
-    
+
     /**
      * Answer the inner class name for the receiver.
      * @return String name of inner class
@@ -92,7 +92,7 @@
         }
         return cachedSimpleClassName;
     }
-    
+
     /**
      * Answer the full name of the inner class represented
      * by this tuple (including its outer component)
@@ -106,17 +106,17 @@
             return C2 + "$" + N;
         }
     }
-    
+
     public boolean isMember() {
         initializeClassStrings();
         return member;
     }
-    
+
     public boolean isAnonymous() {
         initializeClassStrings();
         return anonymous;
     }
-    
+
     private void initializeClassStrings() {
         if(initialized) {
             return;
@@ -181,7 +181,7 @@
         }
         return true;
     }
-    
+
     public String toString() {
         StringBuffer result = new StringBuffer();
         result.append(this.getClass().getName());

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/MetadataBandGroup.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/MetadataBandGroup.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/MetadataBandGroup.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/MetadataBandGroup.java Tue Jan 29 07:53:23 2008
@@ -39,13 +39,13 @@
  * Group of metadata bands, e.g. class_RVA_bands, method_AD_bands etc
  */
 public class MetadataBandGroup {
-        
+
     private String type;
 
     public MetadataBandGroup(String type) {
         this.type = type;
     }
-    
+
     private List attributes;
 
     public int[] param_NB;
@@ -64,7 +64,7 @@
     public CPUTF8[] cases_RU;
     public int[] casearray_N;
     public CPUTF8[] nesttype_RS;
-    public int[] nestpair_N;        
+    public int[] nestpair_N;
     public CPUTF8[] nestname_RU;
 
     private Iterator caseI_Iterator;
@@ -86,9 +86,9 @@
     private Iterator casearray_Iterator;
 
     private Iterator T_iterator;
-    
+
     private Iterator nesttype_RS_Iterator;
-    
+
     private Iterator nestpair_N_Iterator;
 
     private Iterator nestname_RU_Iterator;
@@ -98,8 +98,8 @@
     private Iterator type_RS_Iterator;
 
     private Iterator pair_N_Iterator;
-    
-   
+
+
     public List getAttributes() {
         if(attributes == null) {
             attributes = new ArrayList();
@@ -146,13 +146,13 @@
         Annotation[] annotations = new Annotation[numAnnotations];
         for (int i = 0; i < numAnnotations; i++) {
             annotations[i] = getAnnotation(types[i], pairCounts[i], namesIterator);
-        }        
+        }
         return new RuntimeVisibleorInvisibleAnnotationsAttribute(type
                 .equals("RVA") ? "RuntimeVisibleAnnotations"
                 : "RuntimeInvisibleAnnotations",
                 annotations);
     }
-    
+
     private Attribute getParameterAttribute(int numParameters, Iterator namesIterator ) {
         ParameterAnnotation[] parameter_annotations = new ParameterAnnotation[numParameters];
         for (int i = 0; i < numParameters; i++) {
@@ -215,7 +215,7 @@
             case '@':
                 CPUTF8 type = (CPUTF8) nesttype_RS_Iterator.next();
                 int numPairs = ((Integer)nestpair_N_Iterator.next()).intValue();
-                
+
                 return getAnnotation(type, numPairs, nestname_RU_Iterator);
         }
         return null;
@@ -228,5 +228,5 @@
         }
         return boxed;
     }
-    
+
 }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java Tue Jan 29 07:53:23 2008
@@ -47,7 +47,7 @@
     private List attributes;
 
     private int backwardsCallCount;
-    
+
     private List attributeLayoutElements;
 
     public NewAttributeBands(Segment segment, AttributeLayout attributeLayout) throws IOException {
@@ -59,7 +59,7 @@
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.apache.harmony.pack200.BandSet#unpack(java.io.InputStream)
      */
     public void unpack(InputStream in) throws IOException, Pack200Exception {
@@ -78,7 +78,7 @@
     /**
      * Parse the bands relating to this AttributeLayout and return the correct
      * class file attributes as a List of {@link Attribute}
-     * @throws Pack200Exception 
+     * @throws Pack200Exception
      */
     public List parseAttributes(InputStream in, int occurrenceCount)
             throws IOException, Pack200Exception {
@@ -129,7 +129,7 @@
 
     /**
      * Resolve calls in the attribute layout and returns the number of backwards calls
-     * 
+     *
      * @param tokens -
      *            the attribute layout as a List of AttributeElements
      */
@@ -145,7 +145,7 @@
                     if (layoutElement instanceof Call) {
                         // Set the callable for each call
                         Call call = (Call) layoutElement;
-                        int index = call.callableIndex; 
+                        int index = call.callableIndex;
                         if (index == 0) { // Calls the parent callable
                             backwardsCalls++;
                             call.setCallable(callable);
@@ -319,17 +319,17 @@
 
         /**
          * Read the bands associated with this part of the layout
-         * 
+         *
          * @param in
          * @param count
-         * @throws Pack200Exception 
-         * @throws IOException 
+         * @throws Pack200Exception
+         * @throws IOException
          */
         public void readBands(InputStream in, int count) throws IOException, Pack200Exception;
 
         /**
          * Add the band data for this element at the given index to the attribute
-         * 
+         *
          * @param index
          * @param attribute
          */
@@ -342,18 +342,18 @@
         protected int getLength(char uint_type) {
             int length = 0;;
             switch(uint_type) {
-            case 'B': 
+            case 'B':
                 length = 1;
                 break;
-            case 'H': 
+            case 'H':
                 length = 2;
                 break;
-            case 'I': 
+            case 'I':
                 length = 4;
                 break;
-            case 'V': 
+            case 'V':
                 length = 0;
-                break;            
+                break;
             }
             return length;
         }
@@ -369,7 +369,7 @@
         }
 
         public void readBands(InputStream in, int count) throws IOException, Pack200Exception {
-            band = decodeBandLong(attributeLayout.getName() + "_" + tag, in, (BHSDCodec) getCodec(tag), count);
+            band = decodeBandLong(attributeLayout.getName() + "_" + tag, in, getCodec(tag), count);
         }
 
         public void addToAttribute(int n, NewAttribute attribute) {
@@ -395,7 +395,7 @@
             } else if (tag.startsWith("P")) {
                 char uint_type = tag.substring(1).toCharArray()[0];
                 int length = getLength(uint_type);
-                attribute.addBCIndex(length, (int) value);                
+                attribute.addBCIndex(length, (int) value);
             } else if (tag.startsWith("OS")) {
                 char uint_type = tag.substring(1).toCharArray()[0];
                 int length = getLength(uint_type);
@@ -406,11 +406,11 @@
                 } else if(length == 4) {
                     value = (int)value;
                 }
-                attribute.addBCLength(length, (int) value);  
+                attribute.addBCLength(length, (int) value);
             } else if (tag.startsWith("O")) {
                 char uint_type = tag.substring(1).toCharArray()[0];
                 int length = getLength(uint_type);
-                attribute.addBCLength(length, (int) value);                
+                attribute.addBCLength(length, (int) value);
             }
         }
 
@@ -442,7 +442,7 @@
             countElement.readBands(in, count);
             int arrayCount = 0;
             for (int i = 0; i < count; i++) {
-                arrayCount += countElement.getValue(i);                
+                arrayCount += countElement.getValue(i);
             }
             for (Iterator iter = layoutElements.iterator(); iter.hasNext();) {
                 LayoutElement element = (LayoutElement) iter.next();
@@ -453,14 +453,14 @@
         public void addToAttribute(int index, NewAttribute attribute) {
             // Add the count value
             countElement.addToAttribute(index, attribute);
-            
+
             // Add the corresponding array values
             int offset = 0;
             for (int i = 0; i < index; i++) {
                 offset += countElement.getValue(i);
             }
             long numElements = countElement.getValue(index);
-            for (int i = offset; i < offset + numElements; i++) {                
+            for (int i = offset; i < offset + numElements; i++) {
                 for (Iterator iter = layoutElements.iterator(); iter.hasNext();) {
                     LayoutElement element = (LayoutElement) iter.next();
                     element.addToAttribute(i, attribute);
@@ -469,13 +469,13 @@
         }
     }
 
-    
+
     /**
      * A Union is a type of layout element where the tag value acts as a
      * selector for one of the union cases
      */
     private class Union extends LayoutElement {
-        
+
         private Integral unionTag;
         private List unionCases;
         private List defaultCaseBody;
@@ -506,7 +506,7 @@
             for (int i = 0; i < values.length; i++) {
                 boolean found = false;
                 for (Iterator iter = unionCases.iterator(); iter.hasNext();) {
-                    UnionCase unionCase = (UnionCase) iter.next();                    
+                    UnionCase unionCase = (UnionCase) iter.next();
                     if(unionCase.hasTag(values[i])) {
                         found = true;
                     }
@@ -592,7 +592,7 @@
              */
             if(callableIndex > 0) {
                 callable.addCount(count);
-            } 
+            }
         }
 
         public void addToAttribute(int n, NewAttribute attribute) {
@@ -606,7 +606,7 @@
     private class Reference extends LayoutElement {
 
         private String tag;
-        
+
         private Object band;
 
         private int length;
@@ -677,13 +677,13 @@
     private class Callable implements AttributeLayoutElement {
 
         private List body;
-        
+
         private boolean isBackwardsCallable;
 
         public Callable(List body) throws IOException {
             this.body = body;
         }
-        
+
         private int count;
         private int index;
 
@@ -692,11 +692,11 @@
          * so they don't have to keep track of the internal index
          * of the callable
          * @param attribute
-         */        
+         */
         public void addNextToAttribute(NewAttribute attribute) {
             for (Iterator iter = body.iterator(); iter.hasNext();) {
                 LayoutElement element = (LayoutElement) iter.next();
-                element.addToAttribute(index, attribute);                
+                element.addToAttribute(index, attribute);
             }
             index++;
         }
@@ -721,7 +721,7 @@
             // Ignore n because bands also contain element parts from calls
             for (Iterator iter = body.iterator(); iter.hasNext();) {
                 LayoutElement element = (LayoutElement) iter.next();
-                element.addToAttribute(index, attribute);                
+                element.addToAttribute(index, attribute);
             }
             index++;
         }
@@ -729,7 +729,7 @@
         public boolean isBackwardsCallable() {
             return isBackwardsCallable;
         }
-        
+
         /**
          * Tells this Callable that it is a backwards callable
          */
@@ -737,7 +737,7 @@
             this.isBackwardsCallable = true;
         }
     }
-    
+
     /**
      * A Union case
      */
@@ -899,7 +899,7 @@
      * Once the attribute bands have been read the callables can be informed
      * about the number of times each is subject to a backwards call. This
      * method is used to set this information.
-     * 
+     *
      * @param backwardsCalls
      *            one int for each backwards callable, which contains the number
      *            of times that callable is subject to a backwards call.

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200Exception.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200Exception.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200Exception.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200Exception.java Tue Jan 29 07:53:23 2008
@@ -25,7 +25,7 @@
 
 	/**
 	 * Create a new Pack200 exception with the given message and cause
-	 * 
+	 *
 	 * @param message
 	 *            the text message to display
 	 */
@@ -35,7 +35,7 @@
 
 	/**
 	 * Create a new Pack200 exception with the given message and cause
-	 * 
+	 *
 	 * @param message
 	 *            the text message to display
 	 * @param cause
@@ -47,7 +47,7 @@
 
 	/**
 	 * Create a new Pack200 exception with the given message and cause
-	 * 
+	 *
 	 * @param cause
 	 *            the throwable that caused this problem
 	 */

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java Tue Jan 29 07:53:23 2008
@@ -25,7 +25,7 @@
 	private Codec unvafouredCodec;
 	private int l;
     private long[] favoured;
-	
+
 	public PopulationCodec(Codec favouredCodec, Codec tableCodec, Codec unvafouredCodec) {
 		this.favouredCodec = favouredCodec;
 		this.tokenCodec = tableCodec;
@@ -40,18 +40,18 @@
 		this.unvafouredCodec = unvafouredCodec;
 	}
 
-	
+
 	public long decode(InputStream in) throws IOException, Pack200Exception {
 		throw new Pack200Exception("Population encoding does not work unless the number of elements are known");
 	}
 
-	
+
 	public long decode(InputStream in, long last) throws IOException,
 			Pack200Exception {
 		throw new Pack200Exception("Population encoding does not work unless the number of elements are known");
 	}
 
-	
+
 	public long[] decode(int n, InputStream in) throws IOException, Pack200Exception {
 		favoured = new long[n]; // there must be <= n  values, but probably a lot less
 		long result[];
@@ -90,7 +90,7 @@
 			}
 		}
 		// read favorites
-		result = tokenCodec.decode(n, in);		
+		result = tokenCodec.decode(n, in);
         // read unfavorites
         last = 0;
         for(int i = 0; i < n; i++) {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java Tue Jan 29 07:53:23 2008
@@ -51,7 +51,7 @@
 			return value;
 		} else {
 			this.last = bCodec.decode(in,last);
-			return this.last;			
+			return this.last;
 		}
 	}
 	public String toString() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java?rev=616407&r1=616406&r2=616407&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java Tue Jan 29 07:53:23 2008
@@ -42,19 +42,19 @@
  * combine (non-GZipped) archives into a single large archive by concatenation
  * alone. Thus all the hard work in unpacking an archive falls to understanding
  * a segment.
- * 
+ *
  * This class implements the Pack200 specification by an entry point ({@link #parse(InputStream)})
  * which in turn delegates to a variety of other parse methods. Each parse
  * method corresponds (roughly) to the name of the bands in the Pack200
  * specification.
- * 
+ *
  * The first component of a segment is the header; this contains (amongst other
  * things) the expected counts of constant pool entries, which in turn defines
  * how many values need to be read from the stream. Because values are variable
  * width (see {@link Codec}), it is not possible to calculate the start of the
  * next segment, although one of the header values does hint at the size of the
  * segment if non-zero, which can be used for buffering purposes.
- * 
+ *
  * Note that this does not perform any buffering of the input stream; each value
  * will be read on a byte-by-byte basis. It does not perform GZip decompression
  * automatically; both of these are expected to be done by the caller if the
@@ -70,7 +70,7 @@
 	 * Decode a segment from the given input stream. This does not attempt to
 	 * re-assemble or export any class files, but it contains enough information
 	 * to be able to re-assemble class files by external callers.
-	 * 
+	 *
 	 * @param in
 	 *            the input stream to read from TODO At this point, this must be
 	 *            a non-GZipped input stream, but this decoding could be done in
@@ -107,7 +107,7 @@
     private SegmentHeader header;
 
     private CpBands cpBands;
-    
+
     private AttrDefinitionBands attrDefinitionBands;
 
     private IcBands icBands;
@@ -170,30 +170,30 @@
 		boolean addedClasses = false;
 		InnerClassesAttribute innerClassesAttribute = new InnerClassesAttribute("InnerClasses");
 		IcTuple[] ic_relevant = getIcBands().getRelevantIcTuples(fullName, cp);
-		
+
 		for(int index = 0; index < ic_relevant.length; index++) {
 		    String innerClassString = ic_relevant[index].thisClassString();
 		    String outerClassString = ic_relevant[index].outerClassString();
 		    String simpleClassName = ic_relevant[index].simpleClassName();
-		    
+
 		    CPClass innerClass = null;
 		    CPUTF8 innerName = null;
 		    CPClass outerClass = null;
-		    
+
 		    if(ic_relevant[index].isAnonymous()) {
 		        innerClass = new CPClass(innerClassString);
 		    } else {
 	            innerClass = new CPClass(innerClassString);
 	            innerName = new CPUTF8(simpleClassName, ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
 		    }
-		    
+
 		    // TODO: I think we need to worry about if the
 		    // OUTER class is a member or not - not the
 		    // ic_relevant itself.
 //		    if(ic_relevant[index].isMember()) {
 		        outerClass = new CPClass(outerClassString);
 //		    }
-		    
+
 	        int flags = ic_relevant[index].F;
 	        innerClassesAttribute.addInnerClassesEntry(innerClass, outerClass, innerName, flags);
 	        addedClasses = true;
@@ -236,7 +236,7 @@
 	/**
 	 * This performs the actual work of parsing against a non-static instance of
 	 * Segment.
-	 * 
+	 *
 	 * @param in
 	 *            the input stream to read from
 	 * @throws IOException
@@ -249,7 +249,7 @@
 			Pack200Exception {
 		debug("-------");
         header = new SegmentHeader();
-        header.unpack(in);        
+        header.unpack(in);
         cpBands = new CpBands(this);
         cpBands.unpack(in);
         attrDefinitionBands = new AttrDefinitionBands(this);
@@ -263,11 +263,11 @@
         fileBands = new FileBands(this);
         fileBands.unpack(in);
 	}
-    
+
     /**
      * Unpacks a packed stream (either .pack. or .pack.gz) into a corresponding
      * JarOuputStream.
-     * 
+     *
      * @throws Pack200Exception
      *             if there is a problem unpacking
      * @throws IOException
@@ -281,13 +281,13 @@
         // that possibility
         parse(in).unpack(in, out);
     }
-    
+
     /**
      * This is a local debugging message to aid the developer in writing this
      * class. It will be removed before going into production. If the property
      * 'debug.pack200' is set, this will generate messages to stderr; otherwise,
      * it will be silent.
-     * 
+     *
      * @param message
      * @deprecated this should be removed from production code
      */
@@ -305,7 +305,7 @@
 	 * reading, since the file bits may not be loaded and thus just copied from
 	 * one stream to another. Doesn't close the output stream when finished, in
 	 * case there are more entries (e.g. further segments) to be written.
-	 * 
+	 *
 	 * @param out
 	 *            the JarOutputStream to write data to
 	 * @param in
@@ -324,7 +324,7 @@
         long[] fileOptions = fileBands.getFileOptions();
         long[] fileSize = fileBands.getFileSize();
         byte[][] fileBits = fileBands.getFileBits();
-       
+
 		// out.setLevel(JarEntry.DEFLATED)
 		// now write the files out
 		int classNum = 0;