Suggested backports of JDK 7 langtools fixes to OpenJDK 6

Joseph D. Darcy Joe.Darcy at Sun.COM
Tue Mar 2 11:54:48 PST 2010


Andrew John Hughes wrote:
> On 2 March 2010 04:06, Joe Darcy <Joe.Darcy at sun.com> wrote:
>   
>> Hello.
>>
>> In addition to the JDK 7 fix for
>>
>>   6511613: javac unexpectedly doesn't fail in some cases if an annotation
>> processor specified
>>
>> which Jon has already backported to OpenJDK 6, in my estimation some other
>> recent fixes to langtools in JDK 7 would be fine backports to OpenJDK 6 too:
>>
>>   6927797: langtools/test/tools/javac/EarlyAssert.java fails when run with
>> assertions enabled (-ea)
>>   6926703: apt tests should run with assertions enabled
>>
>> I would gladly let someone else have the honor of doing the backport;
>> otherwise, I'll prepare the backports myself as time permits.
>>
>> -Joe
>>
>>     
>
> I don't know if it's an honour or not, but I've backported and pushed
> both fixes.  All langtools tests passed with the new changesets.
>   

Thanks.  There is a small merge issue.  I should have mentioned, the 
goal was that after these two changesets were included, the langtools 
regression tests would all pass when run with assertions (-ea) and 
system assertions (-esa) enabled, which is now true of JDK 7 langtools.

The difference between the EarlyAssert tests in OpenJDK 6 and JDK 7 
reveals the issue:

31,32c31
<  * @compile -source 1.4 EarlyAssert.java
<  * @run main EarlyAssert
---
 >  * @run main EarlyAssertWrapper

The new EarlyAssertWrapper was added to call EarlyAssert with assertions 
explicitly disabled.  The OpenJDK 6 and JDK 7 versions of the files 
differed before this changeset because the changeset for 6843761: 
"Update langtools tests to remove unncessary -source and -target 
options" was applied in JDK 7.

If the patch for 6843761 applies cleanly other than to EarlyAssert.java, 
that is one way to address the issue under an existing bug id.  
Otherwise, just EarlyAssert.java can be updated.

-Joe



More information about the jdk6-dev mailing list