Leaking resources in an application is never a good idea, as it can lead to memory issues, and even the crash of the application. This rule template allows you to specify which constructions open a resource and how it is closed in order to raise issue within a method scope when custom resources are leaked.
the fully-qualified name of a constructor that creates an open resource. An optional signature may be specified after the class name. E.G. "org.assoc.res.MyResource" or "org.assoc.res.MySpecialResource(java.lang.String, int)"
****
.factoryMethod
****
the fully-qualified name of a factory method that returns an open resource, with or without a parameter list. E.G. "org.assoc.res.ResourceFactory#create" or "org.assoc.res.SpecialResourceFactory #create(java.lang.String, int)"
****
.openingMethod
****
the fully-qualified name of a method that opens an existing resource, with or without a parameter list. E.G. "org.assoc.res.ResourceFactory#create" or "org.assoc.res.SpecialResourceFactory #create(java.lang.String, int)"
****
.closingMethod
****
the fully-qualified name of the method which closes the open resource, with or without a parameter list. E.G. "org.assoc.res.MyResource#closeMe" or "org.assoc.res.MySpecialResource#closeMe(java.lang.String, int)"