Details

    • Type: Bug Detection
    • Status: Active
    • Resolution: Unresolved
    • Message:
      Close this "xxx".
    • List of parameters:
      Hide
      • key: constructor
        • description: 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)"
      • key: factoryMethod
        • description: 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)"
      • key: openingMethod
        • description: 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)"
      • key: closingMethod
        • description: 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)"
      Show
      key: constructor description: 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)" key: factoryMethod description: 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)" key: openingMethod description: 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)" key: closingMethod description: 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)"
    • Default Severity:
      Blocker
    • Impact:
      High
    • Likelihood:
      High
    • Template Rule:
      Yes
    • Covered Languages:
      Java

      Description

      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.

      See also

      • S2095 - Resources should be closed

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nicolas.peru Nicolas Peru
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: