public class PossibleIncompleteSerialization
extends java.lang.Object
implements edu.umd.cs.findbugs.Detector
Modifier and Type | Field and Description |
---|---|
private edu.umd.cs.findbugs.BugReporter |
bugReporter |
static java.lang.String |
SIG_OBJECT_OUTPUT_STREAM_TO_VOID |
static java.lang.String |
SIG_OBJECT_OUTPUT_TO_VOID |
Constructor and Description |
---|
PossibleIncompleteSerialization(edu.umd.cs.findbugs.BugReporter bugReporter)
constructs a PIS detector given the reporter to report bugs on
|
Modifier and Type | Method and Description |
---|---|
private static boolean |
hasSerializableFields(org.apache.bcel.classfile.JavaClass cls)
looks for fields that are candidates for serialization
|
private static boolean |
hasSerializingMethods(org.apache.bcel.classfile.JavaClass cls)
looks to see if this class implements method described by Serializable or Externalizable
|
private static boolean |
isSerializable(org.apache.bcel.classfile.JavaClass cls)
returns if the class implements Serializable or Externalizable
|
void |
report() |
java.lang.String |
toString() |
void |
visitClassContext(edu.umd.cs.findbugs.ba.ClassContext classContext)
implements the visitor to look for classes that are serializable, and are derived from non serializable classes and don't either implement methods in
Externalizable or Serializable to save parent class fields.
|
public static final java.lang.String SIG_OBJECT_OUTPUT_STREAM_TO_VOID
public static final java.lang.String SIG_OBJECT_OUTPUT_TO_VOID
private final edu.umd.cs.findbugs.BugReporter bugReporter
public PossibleIncompleteSerialization(edu.umd.cs.findbugs.BugReporter bugReporter)
bugReporter
- the sync of bug reportspublic void visitClassContext(edu.umd.cs.findbugs.ba.ClassContext classContext)
visitClassContext
in interface edu.umd.cs.findbugs.Detector
classContext
- the context object of the currently parsed classprivate static boolean isSerializable(org.apache.bcel.classfile.JavaClass cls) throws java.lang.ClassNotFoundException
cls
- the class to check for interfacesjava.lang.ClassNotFoundException
- if a super class or super interfaces can't be foundprivate static boolean hasSerializableFields(org.apache.bcel.classfile.JavaClass cls)
cls
- the class to look for fieldsprivate static boolean hasSerializingMethods(org.apache.bcel.classfile.JavaClass cls)
cls
- the class to examine for serializing methodspublic void report()
report
in interface edu.umd.cs.findbugs.Detector
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005-2018 MeBigFatGuy.com. All Rights Reserved.