Repository navigation
Commit 6bc7da7
authored
chore(jdbc): suppress expected compiler warnings (#248)
## Why
The build runs `-Xlint:all`, so every run reports expected warnings. Two
tests exercise the deprecated Unicode stream API on purpose, the
vendored xerial tree uses deprecated JDK methods, and the parameter
metadata view triggers a `this` escape that it cannot actually cause.
The noise makes a new warning hard to see.
## What changed
- Suppress `deprecation` on the two tests that exercise the deprecated
Unicode stream methods.
- Suppress the deprecation detail and javac's summary note for the
`libsql-conformance` test compile, which includes the vendored xerial
sources.
- Suppress `this-escape` on the `LibsqlPreparedStatement` constructor
and document why the view is safe.
## Scope
No behavior change. The deprecated calls stay in the tests, and the
vendored tree stays untouched. Only the compiler diagnostics are
suppressed, and only where the warning is expected.
## Tradeoffs
`-XDsuppressNotes` is an internal javac option. It is scoped to the
conformance test compile, and the build pins the JDK.
## Blast Radius
Compiler diagnostics only. The driver and its tests are unchanged, and
the `libsql-conformance` main sources keep the full lint set.
## Verification
- `clean verify`: 2,006 tests, 0 failures, 7 skipped, `BUILD SUCCESS`.
- `libsql-jdbc` clean test: 1,510 tests, 0 failures, with no
`deprecated` or `this-escape` warning.
- Conformance test compile: no deprecation detail and no summary note.
- `spotless:check` passes.
The JDK's `sun.misc.Unsafe` warning from ByteBuddy is unrelated and
remains.1 parent e41cac1 commit 6bc7da7
4 files changed
Lines changed: 24 additions & 0 deletions
File tree
- libsql-conformance
- libsql-jdbc/src
- main/java/com/github/magnusp/libsql/jdbc
- test/java/com/github/magnusp/libsql/jdbc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
166 | 183 | | |
167 | 184 | | |
168 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| 412 | + | |
| 413 | + | |
412 | 414 | | |
413 | 415 | | |
414 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
| 461 | + | |
460 | 462 | | |
461 | 463 | | |
462 | 464 | | |
| |||
0 commit comments