File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
java/ql/src/Likely Bugs/Serialization Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,18 @@ import java
15
15
16
16
from Method m , TypeSerializable serializable , string reason
17
17
where
18
+ m .fromSource ( ) and
18
19
m .getDeclaringType ( ) .hasSupertype + ( serializable ) and
19
20
(
20
21
m .hasStringSignature ( "readObject(ObjectInputStream)" ) or
21
22
m .hasStringSignature ( "readObjectNoData()" ) or
22
- m .hasName ( "writeObject(ObjectOutputStream)" )
23
+ m .hasStringSignature ( "writeObject(ObjectOutputStream)" )
23
24
) and
24
25
(
25
26
not m .isPrivate ( ) and reason = "Method must be private"
26
- or m .isStatic ( ) and reason = "Method must not be static"
27
- or not m .getReturnType ( ) instanceof VoidType and reason = "Return type must be void"
27
+ or
28
+ m .isStatic ( ) and reason = "Method must not be static"
29
+ or
30
+ not m .getReturnType ( ) instanceof VoidType and reason = "Return type must be void"
28
31
)
29
- select m , reason
32
+ select m , "Not recognized by Java serialization framework: " + reason
You can’t perform that action at this time.
0 commit comments