Class NoOpUtils

java.lang.Object
org.techbd.util.NoOpUtils

public class NoOpUtils extends Object
Utility class for handling exceptions by ignoring them.

This class is mainly used to avoid warnings from static code analysis tools like PMD which flag empty catch blocks.

Example usage:

 try {
     // some code that may throw an exception
 } catch (Exception e) {
     NoOpUtils.ignore(e);
 }
 
  • Constructor Details

    • NoOpUtils

      public NoOpUtils()
  • Method Details

    • ignore

      public static void ignore(Exception e)
      Ignores the given exception.

      This method is intentionally left blank to provide a way to explicitly ignore exceptions without triggering static code analysis warnings.

      Parameters:
      e - the exception to be ignored