]> source.dussan.org Git - aspectj.git/commit
Throw exception for minimal AJC runtime version violation
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Fri, 15 Mar 2024 08:20:21 +0000 (09:20 +0100)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Fri, 15 Mar 2024 08:46:19 +0000 (09:46 +0100)
commitb8447ab23c547b553325e65d3dc24b8f8d2a780b
treeae49b039a56a8a3277957c123d47e78073f715df
parentd27943749cc35864ff4565a444b21851915307ab
Throw exception for minimal AJC runtime version violation

When running AJC, throw an AbortException(MINIMAL_JRE_VERSION) instead
of just logging an error, if the minimal JRE version requirement is
violated. Otherwise, in-process compilation would not fail due to the
skipped System.exit(-1) that was used before. In-process compilation is,
for example, relevant for AspectJ Maven Plugin, but also for non-forked
executions of Plexus AspectJ via Maven Compiler.

I am not 100% sure that AbortException is the appropriate exception
type, because it was designed for an aborted compilation process and
here compilation has not even started yet, but it seems to work fine.

Relates to #269.
Fixes #292.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
org.aspectj.ajdt.core/src/main/java/org/aspectj/tools/ajc/Main.java