Skip to content

Commit 0fcd0a1

Browse files
ppkarwaszgarydgregory
authored andcommitted
Disable ShadingFootprintTest in a native image
The test reads the compiled .class files from the code-source location, which only exists on a regular JVM: a native image carries no bytecode (and nobody shades one), so every closure lookup fails there. Disable it with @DisabledInNativeImage, matching its exclusion from the Android test compile. Assisted-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 6a547ef commit 0fcd0a1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/test/java/org/apache/commons/xml/ShadingFootprintTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.junit.jupiter.api.AfterAll;
3333
import org.junit.jupiter.api.BeforeAll;
3434
import org.junit.jupiter.api.Test;
35+
import org.junit.jupiter.api.condition.DisabledInNativeImage;
3536
import org.vafer.jdependency.Clazz;
3637
import org.vafer.jdependency.Clazzpath;
3738

@@ -42,7 +43,11 @@
4243
* closure over the compiled {@code target/classes} and pins it to an expected set. It keeps each hardener from silently regaining a dependency on classes it
4344
* should not need (for example a sibling resolver floor or another hardener), so TrAX, XPath and schema build only on the shared SAX path while only the public
4445
* {@link XmlFactories} entry pulls the whole library. Update the expected sets deliberately: a change here is a change to what a downstream shade includes.</p>
46+
*
47+
* <p>The test reads the compiled {@code .class} files from the code-source location, which only exists on a regular JVM: a native image carries no bytecode (and
48+
* nobody shades one), so the test is disabled there, just as it is excluded from the Android test compile.</p>
4549
*/
50+
@DisabledInNativeImage
4651
class ShadingFootprintTest {
4752

4853
private static final String PKG = "org.apache.commons.xml.";

0 commit comments

Comments
 (0)