Hi, On Tue, Mar 14, 2017 at 10:08 PM Ed Willink <e...@willink.me.uk> wrote:
> @Dani: I've clarified my confusions in the wiki and added a new table > for Orbit utility; ASM bombs on Java 9 classes. > Prior to passing class bytes to ASM as a temporary workaround you can change them, so that ASM will believe that it is V1_8. We use this trick in JaCoCo - see https://github.com/jacoco/jacoco/blob/v0.7.9/org.jacoco.core/src/org/jacoco/core/internal/Java9Support.java#L101 This is safe, because Java 9 does not introduce any new instructions. Version can be restored after bytecode generation/modification - see https://github.com/jacoco/jacoco/blob/v0.7.9/org.jacoco.core/src/org/jacoco/core/internal/Java9Support.java#L112 This way even bytes of module-info.class can be passed to ClassReader. This does not bring much value without implementation of custom encoder/decoder for new attribute Module that is otherwise simply ignored. Also not sure how this works in respect to reading/writing of new Constant Pool entries - we haven't experimented with this, because module-info.class is not used and will not be used by JaCoCo. And AFAIK format of this new entities was (maybe even still) very unstable. HTH, Evgeny
_______________________________________________ cross-project-issues-dev mailing list cross-project-issues-dev@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev