Bug 545033 - AspectJ 1.8.x fails with modular and multi-release JARs
Summary: AspectJ 1.8.x fails with modular and multi-release JARs
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.8.11   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-04 16:59 EST by Eric Edens CLA
Modified: 2019-03-06 19:27 EST (History)
2 users (show)

See Also:


Attachments
Ignore Java 9+ JAR elements, Rev 1 (9.44 KB, patch)
2019-03-04 17:01 EST, Eric Edens CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.