Skip to content

Commit 10f0476

Browse files
committed
Use inline test expectations
1 parent 6a48459 commit 10f0476

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

java/ql/test/query-tests/UselessMembersOfTheRecordsClass/Test.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@ public class Test {
44
record T1() implements Serializable {
55

66
@Serial
7-
private static final ObjectStreamField[] serialPersistentFields = new ObjectStreamField[0]; // NON_COMPLIANT
7+
private static final ObjectStreamField[] serialPersistentFields = new ObjectStreamField[0]; // $ Alert
88

99
@Serial
10-
private void writeObject(ObjectOutputStream out) throws IOException {} // NON_COMPLIANT
10+
private void writeObject(ObjectOutputStream out) throws IOException {} // $ Alert
1111

1212
@Serial
13-
private void readObject(ObjectOutputStream out) throws IOException {}// NON_COMPLIANT
13+
private void readObject(ObjectOutputStream out) throws IOException {} // $ Alert
1414

1515
@Serial
16-
private void readObjectNoData(ObjectOutputStream out) throws IOException { // NON_COMPLIANT
16+
private void readObjectNoData(ObjectOutputStream out) throws IOException { // $ Alert
1717
}
1818

1919
}
2020

2121
record T2() implements Externalizable {
2222

2323
@Override
24-
public void writeExternal(ObjectOutput out) throws IOException { // NON_COMPLIANT
24+
public void writeExternal(ObjectOutput out) throws IOException { // $ Alert
2525
}
2626

2727
@Override
28-
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // NON_COMPLIANT
28+
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // $ Alert
2929
}
3030

3131
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Violations of Best Practice/Records/UselessMembersOfTheRecordsClass.ql
1+
query: Violations of Best Practice/Records/UselessMembersOfTheRecordsClass.ql
2+
postprocess: utils/test/InlineExpectationsTestQuery.ql

0 commit comments

Comments
 (0)