RFR 8011805: Update sun.tools.java class file reading/writing support to include the new constant pool entries (including invokedynamic)

Remi Forax forax at univ-mlv.fr
Thu Apr 11 14:45:43 PDT 2013


On 04/11/2013 11:23 PM, Robert Field wrote:
> Thank you Mike, Alan, and Brian for your reviews, and others for your
> assistance.
>
> Updated webrev:
>
>       http://cr.openjdk.java.net/~rfield/8011805_2
>
> Changes are all in the test:
>
> * Removed unused testWrite and related code.
> * Used correct copyright.
> * Added finally clauses which close file and clean-up.
> * Simplified code, removing rmic copied code.
> * Fixed @test comment format.
>
> -Robert

Hi Robert,
in BinaryConstantPool, using a local variable when writing the constant 
pool constants makes the code easier to read, IMO.

     case CONSTANT_METHODHANDLE:
     case CONSTANT_METHODTYPE:
     case CONSTANT_INVOKEDYNAMIC:  {
         byte[] array = (byte[])x;
         out.write(array, 0, array.length);
         break;
     }


otherwise, thumb up.

Rémi

>
> On 04/10/13 21:24, Robert Field wrote:
>> Currently blocking lambda library pushes.  Internal class reader used by
>> rmic does not support new constant pool constant types:
>>
>>     CONSTANT_METHODHANDLE         = 15;
>>
>>     CONSTANT_METHODTYPE           = 16;
>>
>>     CONSTANT_INVOKEDYNAMIC        = 18;
>>
>>
>> Please review the fix for CR:
>>
>>         http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8011805
>>
>> Webrev:
>>
>>         http://cr.openjdk.java.net/~rfield/8011805/
>>
>



More information about the lambda-dev mailing list