Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3441

FP in S1174 when "finalize()" is not from Object.

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5
    • Component/s: Rules
    • Labels:

      Description

      Any method named finalize returning void will be reported by S1174 , while it does not mean that it's coming from Object.

      abstract class ClassWithFinalize {
        abstract public void finalize(String arg) throws Throwable; // FP
      }
      
      class ObjectFinalize_Not_Object_Finalize extends ClassWithFinalize {
      
        @Override
        public void finalize(String arg) throws Throwable { // FP
      
        }
      }
      

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                quentin.jaquier Quentin Jaquier
                Reporter:
                quentin.jaquier Quentin Jaquier
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: