[
https://issues.apache.org/jira/browse/COMPRESS-721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18065345#comment-18065345
]
Gary D. Gregory commented on COMPRESS-721:
------------------------------------------
Note: I removed the unused package-private
{{org.apache.commons.compress.harmony.unpack200.Pack200UnpackerAdapter.unwrap(InputStream),}}
which uses reflection. This shouldn't affect this specific report of course.
> Pack200 and jdk > 16
> --------------------
>
> Key: COMPRESS-721
> URL: https://issues.apache.org/jira/browse/COMPRESS-721
> Project: Commons Compress
> Issue Type: Task
> Reporter: Tim Allison
> Priority: Minor
>
> On regression tests on Apache Tika comparing 4.x (jdk 17) against 3.x (jdk
> 11), we noticed new exceptions on pack200 files:
> {noformat}
> Caused by: java.lang.reflect.InaccessibleObjectException
> at
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
> at
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
> at
> java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
> at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
> at
> org.apache.commons.lang3.reflect.FieldUtils.getField(FieldUtils.java:205)
> at
> org.apache.commons.lang3.reflect.FieldUtils.readField(FieldUtils.java:450)
> at
> org.apache.commons.compress.harmony.unpack200.Pack200UnpackerAdapter.readField(Pack200UnpackerAdapter.java:138)
> {noformat}
> We can use {{--add-opens java.base/java.io=ALL-UNNAMED}}, but a cleaner fix
> would be to refactor the reflection unpack200.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)