Review resource cleanup on FileInputStream and FileOutputStream overridden close method

This rule flags the declarations of the close() method on subclasses of java.io.FileInputStream and java.io.FileOutputStream. In order to clean up resources, ensure that this close() method is either called directly or your resource is created with a try-with-resources block. You cannot depend on object finalization to invoke this close method. Object finalization is not reliable and the finalize method is deprecated.

For more information on the removed classes, see Java 10 Removed Features and Options, Class FileInputStream documentation, and Class FileOutputStream documentation.