Commit b5a8adf
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 cdd43ed commit b5a8adf
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