Skip to content

Commit 7a0e248

Browse files
committed
Exclude .kt files from serializable inner class query
1 parent 782c82a commit 7a0e248

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

java/ql/src/Likely Bugs/Serialization/NonSerializableInnerClass.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ predicate exceptions(NestedClass inner) {
7777

7878
from NestedClass inner, Class outer, string advice
7979
where
80-
inner.fromSource() and
80+
inner.getFile().isJavaSourceFile() and
8181
isSerializable(inner) and
8282
outer = enclosingInstanceType+(inner) and
8383
not isSerializable(outer) and
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
| NonSerializableInnerClassTest.kt:4:3:5:3 | X | Serializable inner class of non-serializable class $@. Consider making the class static or implementing readObject() and writeObject(). | NonSerializableInnerClassTest.kt:3:1:6:1 | A | A |
2-
| NonSerializableInnerClassTest.kt:9:3:10:3 | X | Serializable inner class of non-serializable class $@. Consider making the class static or implementing readObject() and writeObject(). | NonSerializableInnerClassTest.kt:8:1:11:1 | B | B |

0 commit comments

Comments
 (0)