Skip to content

Commit 58b3491

Browse files
xerialclaude
andcommitted
Suppress AccessController deprecation warning
AccessController has been deprecated for removal since Java 17 as part of JEP 411. Since snappy-java needs to maintain compatibility with Java 8+, we cannot remove the AccessController.doPrivileged calls. This commit adds @SuppressWarnings("removal") to suppress the deprecation warning while maintaining backward compatibility. The AccessController calls are used to bypass SecurityManager restrictions when cleaning DirectByteBuffers. In Java 17+, these calls effectively just run the action directly since SecurityManager is being phased out. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b445794 commit 58b3491

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/main/java/org/xerial/snappy/pool/DirectByteBuffers.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
/**
2121
* Utility to facilitate disposing of direct byte buffer instances.
2222
*/
23+
@SuppressWarnings("removal") // AccessController is deprecated for removal in Java 17+
2324
final class DirectByteBuffers {
2425

2526
/**

0 commit comments

Comments
 (0)