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

FP on S1172: identifying methods writeObject and readObject from serializable should rely on semantic

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.10
    • Component/s: Rules
    • Labels:
      None

      Description

      Ignoring special methods writeObject and readObject, related to serialization, should rely on semantic instead of counting parameters and throws clauses.

      private void writeObject(java.io.ObjectOutputStream out) throws MyException { // should be compliant
        throw new MyException();
      }
      private void readObject(java.io.ObjectInputStream in) throws MyException { // should be compliant
        throw new MyException();
      }
      

      About these methods: Serializable.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael.gumowski Michael Gumowski
                Reporter:
                michael.gumowski Michael Gumowski
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: