uschindler commented on a change in pull request #579:
URL: https://github.com/apache/lucene/pull/579#discussion_r777558321



##########
File path: 
lucene/misc/src/java/org/apache/lucene/misc/util/fst/UpToTwoPositiveIntOutputs.java
##########
@@ -77,7 +77,7 @@ public int hashCode() {
   }
 
   // Ignore the deprecated constructor. We do want a unique object here.
-  @SuppressWarnings({"all"})
+  @SuppressWarnings("removal")

Review comment:
       same here

##########
File path: 
lucene/core/src/java/org/apache/lucene/util/fst/PositiveIntOutputs.java
##########
@@ -31,7 +31,7 @@
 public final class PositiveIntOutputs extends Outputs<Long> {
 
   // Ignore the deprecated constructor. We do want a unique object here.
-  @SuppressWarnings({"all"})
+  @SuppressWarnings("removal")

Review comment:
       We should really fix this! I assume `Long.valueOf(0L)` won't work, so we 
should maybe use another way of doing this. I'd suggest `Optional<Long>` 
instead of just `Long`

##########
File path: lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java
##########
@@ -584,9 +584,10 @@ public static long shallowSizeOfInstance(Class<?> clazz) {
       final Class<?> target = clazz;
       final Field[] fields;
       try {
-        fields =
-            AccessController.doPrivileged((PrivilegedAction<Field[]>) 
target::getDeclaredFields);
-      } catch (AccessControlException e) {
+        @SuppressWarnings("removal")
+        Field[] f = AccessController.doPrivileged((PrivilegedAction<Field[]>) 
target::getDeclaredFields);

Review comment:
       maybe add "final" here. The changes is needed to have the 
`@SuppressWarnings` only on that line (because the annotation needs a local 
variable declaration)?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to