[ 
https://issues.apache.org/jira/browse/CRYPTO-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17780738#comment-17780738
 ] 

Sebb commented on CRYPTO-158:
-----------------------------

The class CryptoInputStream does currently use reflection to deallocate the 
buffers.

AFAICT there is no supported way to do this.
It looks like one has to wait for GC to free the memory.

It might be sufficient to change the freeDirectBuffer method to use clear() 
instead.

> Illegal reflective access
> -------------------------
>
>                 Key: CRYPTO-158
>                 URL: https://issues.apache.org/jira/browse/CRYPTO-158
>             Project: Commons Crypto
>          Issue Type: Bug
>          Components: Cipher
>    Affects Versions: 1.1.0
>         Environment: Linux OpenJDK 15.0.2
>            Reporter: Juan F Arjona
>            Priority: Minor
>
> Getting this message:
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by 
> org.apache.commons.crypto.stream.CryptoInputStream 
> (.../BOOT-INF/lib/commons-crypto-1.1.0.jar!/) to method 
> sun.nio.ch.DirectBuffer.cleaner()
> WARNING: Please consider reporting this to the maintainers of 
> org.apache.commons.crypto.stream.CryptoInputStream
> WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> reflective access operations
> WARNING: All illegal access operations will be denied in a future release



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

Reply via email to