Bug 545033

Summary: AspectJ 1.8.x fails with modular and multi-release JARs
Product: [Tools] AspectJ Reporter: Eric Edens <ericeden>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aclement, ericeden
Version: 1.8.11   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Ignore Java 9+ JAR elements, Rev 1 none

Description Eric Edens CLA 2019-03-04 16:59:50 EST
Problem Overview
================

Modular and multi-release JARs contain elements that AspectJ 1.8.x doesn't understand, and arguably shouldn't understand, since 1.8.x targets Java 8 users. Presently, two failures will occur with these JARs:

(1) It will attempt to process modular-info.class files, but will fail to understand them. The error 'Invalid byte tag in constant pool' was observed.

(2) It will find and attempt to process class files in the "multi-release" section under META-INF. I assume AspectJ would fail if it found bytecode that it didn't understand, but I haven't observed that. What I did observe was that it processed two classes with the same name and package (one in the normal location and one in META-INF) and attempted to write them both back to the normal location.


Proposed Solution
=================

Release a minor update (1.8.14) that ignores:
 - modular-info.class
 - Any class file under META-INF


Related Discussion
==================

https://www.eclipse.org/lists/aspectj-dev/msg03255.html
Comment 1 Eric Edens CLA 2019-03-04 17:01:50 EST
Created attachment 277760 [details]
Ignore Java 9+ JAR elements, Rev 1
Comment 2 Andrew Clement CLA 2019-03-06 19:27:51 EST
Fixed in 1.8.14 - now available for download (and sent to central, likely takes a few hours to appear).

Thanks for the contribution.