Commit 2c873b5
committed
Disable potential resource leak warnings in Java
The Gson library that LSP4J is heavily dependent on uses the errorprone
annotations. If Eclipse supported warning suppression based on the
errorprone annotations, the dozens of potential resource leak warnings
in the LSP4J code would be automatically suppressed.
This happens because Gson classes such as JsonWriter returns `this`
in many of its methods, and since JsonWriter is a Closeable, the
JDT warns about it. See for example JsonWrite.nullValue. Gson annotates
this method as CanIgnoreReturnValue, meaning no potential resource leak.
If JDT gets support for error prone annotations, this warning can be
re-enabled.1 parent 52060cb commit 2c873b5
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
0 commit comments