You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on review feedback, narrowed the scope of @SuppressWarnings("removal")
annotations to only the specific methods and code blocks that use AccessController,
rather than applying it at the class level. This approach:
- Reduces the scope of the suppression
- Avoids hiding other potential deprecation warnings
- Follows best practices for targeted warning suppression
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: src/main/java/org/xerial/snappy/pool/DirectByteBuffers.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,6 @@
20
20
/**
21
21
* Utility to facilitate disposing of direct byte buffer instances.
22
22
*/
23
-
@SuppressWarnings("removal") // AccessController is deprecated for removal in Java 17+
24
23
finalclassDirectByteBuffers {
25
24
26
25
/**
@@ -36,6 +35,7 @@ final class DirectByteBuffers {
36
35
// and https://github.com/apache/lucene-solr/blob/7e03427fa14a024ce257babcb8362d2451941e21/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
37
36
MethodHandlecleanHandle = null;
38
37
try {
38
+
@SuppressWarnings("removal") // AccessController is deprecated for removal in Java 17+
Logger.getLogger(DirectByteBuffers.class.getName()).log(Level.FINE, "Exception occurred attempting to lookup Sun specific DirectByteBuffer cleaner classes.", t);
0 commit comments