DomGarguilo commented on code in PR #5785:
URL: https://github.com/apache/accumulo/pull/5785#discussion_r2274400160


##########
core/src/main/java/org/apache/accumulo/core/fate/Fate.java:
##########
@@ -572,4 +572,10 @@ private void waitForDeadResCleanerShutdown(long start, 
long timeout, TimeUnit ti
       }
     }
   }
+
+  @Override
+  @SuppressWarnings("deprecation")
+  public final void finalize() {
+    // Prevent finalizer attacks (SpotBugs CT_CONSTRUCTOR_THROW)
+  }

Review Comment:
   Yea I agree. Adding the finalize method definitely seems like the worst fix. 
   
   I think the best way to handle things is 
   1. if its easy and safe to remove the exception thrown from the constructor, 
do that (usually not possible)
   2. try to make the class final if its obvious that it can be made final
   3. add a `@SuppressFBWarnings` tag to the place in the code that the warning 
is coming from
   
   Do you think that sounds good or would do you think its best to suppress 
this at module/project level?



-- 
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: notifications-unsubscr...@accumulo.apache.org

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

Reply via email to