Skip to content

Commit 8899c1b

Browse files
committed
update java/unassigned-field to match csharp
1 parent 280b101 commit 8899c1b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

java/ql/src/Violations of Best Practice/Dead Code/NonAssignedFields.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,6 @@ where
8686
) and
8787
// Exclude special VM classes.
8888
not isVMObserver(f.getDeclaringType())
89-
select f, "Field " + f.getName() + " never assigned non-null value, yet it is read at $@.", fr,
90-
fr.getFile().getStem() + ".java:" + fr.getLocation().getStartLine()
89+
select f,
90+
"The field '" + f.getName() + "' is never explicitly assigned a value, yet it is read $@.", fr,
91+
"here"

0 commit comments

Comments
 (0)