Describe the bug
I see this error when running a Maven build with the JaCoCo code coverage plugin, Java 21, and AWS SDK v2 version 2.31.76, with the AWS SDK v2 SSM dependency in classpath.
java.lang.instrument.IllegalClassFormatException: Error while instrumenting software/amazon/awssdk/services/ssm/DefaultSsmClient with JaCoCo 0.8.13.202504020838/78d5eff`
Regression Issue
Expected Behavior
No error emitted
Current Behavior
Instrumentation error emitted in maven build, see https://github.com/jpalomaki/aws-sdk-java-v2-ssm-jacoco-sscce/actions/runs/16073837387/job/45364298935#step:4:41
Reproduction Steps
https://github.com/jpalomaki/aws-sdk-java-v2-ssm-jacoco-sscce
Possible Solution
Can the generated code be modularized better (to not create very large classes)?
Additional Information/Context
The issue can be worked around by adding an exclusion to the JaCoCo plugin like so:
<configuration>
<excludes>
<exclude>software/amazon/awssdk/services/ssm/DefaultSsmClient</exclude>
</excludes>
</configuration>
However, I submitted this issue because I felt that it might be better to optimize the generated code, if possible.
AWS Java SDK version used
2.31.76
JDK version used
openjdk version "21.0.5" 2024-10-15 LTS (corretto)
Operating System and version
Ubuntu 24.04 and macOS 15.5
Describe the bug
I see this error when running a Maven build with the JaCoCo code coverage plugin, Java 21, and AWS SDK v2 version
2.31.76, with the AWS SDK v2 SSM dependency in classpath.Regression Issue
Expected Behavior
No error emitted
Current Behavior
Instrumentation error emitted in maven build, see https://github.com/jpalomaki/aws-sdk-java-v2-ssm-jacoco-sscce/actions/runs/16073837387/job/45364298935#step:4:41
Reproduction Steps
https://github.com/jpalomaki/aws-sdk-java-v2-ssm-jacoco-sscce
Possible Solution
Can the generated code be modularized better (to not create very large classes)?
Additional Information/Context
The issue can be worked around by adding an exclusion to the JaCoCo plugin like so:
However, I submitted this issue because I felt that it might be better to optimize the generated code, if possible.
AWS Java SDK version used
2.31.76
JDK version used
openjdk version "21.0.5" 2024-10-15 LTS (corretto)
Operating System and version
Ubuntu 24.04 and macOS 15.5