It would be ok to use multiple instances of the reader concurrently as long as they relates to the same pack file, but I suppose you're right in that there could be a situation where two different files are being packed concurrently in the same VM. I will have a re-think.
Thanks, Sian 2008/11/27 Nathan Beyer <[EMAIL PROTECTED]>: > I was browsing this comment and noticed this bit below, inline ... > > On Thu, Nov 27, 2008 at 5:30 AM, <[EMAIL PROTECTED]> wrote: >> Author: sjanuary >> Date: Thu Nov 27 03:30:06 2008 >> New Revision: 721161 >> >> URL: http://svn.apache.org/viewvc?rev=721161&view=rev >> Log: >> New pack200 test cases, and bug fixes to enable them to pass, including: >> - Improved support for Synthetic attributes >> - Fix for an encoding bug >> - Empty LocalVariableTable attributes added to all Code attributes >> >> Modified: >> harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200ClassReader.java >> URL: >> http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200ClassReader.java?rev=721161&r1=721160&r2=721161&view=diff >> ============================================================================== >> --- >> harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200ClassReader.java >> (original) >> +++ >> harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200ClassReader.java >> Thu Nov 27 03:30:06 2008 >> @@ -28,6 +28,8 @@ >> public class Pack200ClassReader extends ClassReader { >> >> private boolean lastConstantHadWideIndex; >> + private int lastUnsignedShort; > > Shouldn't this be a instance field, rather than a class field? If it's > a class field (static), then you couldn't use multiple instances of > the reader concurrently. > >> + private static boolean anySyntheticAttributes; >> > -- Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
