[ 
https://issues.apache.org/jira/browse/SLING-12930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu closed SLING-12930.
-----------------------------------

> XSS API fails to build and run with Java 25 due to missing 
> Unsafe.ensureClassInitialized
> ----------------------------------------------------------------------------------------
>
>                 Key: SLING-12930
>                 URL: https://issues.apache.org/jira/browse/SLING-12930
>             Project: Sling
>          Issue Type: Improvement
>          Components: XSS Protection API
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: XSS Protection API 2.4.8
>
>         Attachments: screenshot-1.png
>
>
> Root cause seems to be 
> {noformat}
> [INFO] Running org.apache.sling.xss.impl.AntiSamyPolicyTest
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.309 
> s <<< FAILURE! -- in org.apache.sling.xss.impl.AntiSamyPolicyTest
> [ERROR] org.apache.sling.xss.impl.AntiSamyPolicyTest -- Time elapsed: 0.309 s 
> <<< ERROR!
> java.lang.NoSuchMethodError: 'void 
> sun.misc.Unsafe.ensureClassInitialized(java.lang.Class)'
>       at 
> org.apache.sling.xss.impl.AntiSamyPolicyAdapter.removeAttributeGuards(AntiSamyPolicyAdapter.java:256)
>       at 
> org.apache.sling.xss.impl.AntiSamyPolicyAdapter.<init>(AntiSamyPolicyAdapter.java:51)
>       at org.apache.sling.xss.impl.HtmlSanitizer.<init>(HtmlSanitizer.java:40)
>       at 
> org.apache.sling.xss.impl.AntiSamyPolicyTest.setup(AntiSamyPolicyTest.java:48)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:565)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to