Skip to content

chore(jdbc): suppress expected compiler warnings - #248

Merged
magnusp merged 1 commit into
mainfrom
chore/jdbc-suppress-expected-warnings
Oct 25, 2026
Merged

magnusp merged 1 commit into
mainfrom
chore/jdbc-suppress-expected-warnings

Conversation

@magnusp

@magnusp magnusp commented Oct 25, 2026

Copy link
Copy Markdown
Owner

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.

The build runs -Xlint:all, so tests that exercise deprecated JDBC methods and the vendored xerial tree report warnings on every run. Suppress only those expected diagnostics, and document why the parameter metadata view cannot trigger the this-escape warning.
@magnusp
magnusp merged commit 6bc7da7 into main Oct 25, 2026
6 checks passed
@magnusp
magnusp deleted the chore/jdbc-suppress-expected-warnings branch October 25, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant