Repository navigation
chore(jdbc): suppress expected compiler warnings - #248
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 athisescape that it cannot actually cause. The noise makes a new warning hard to see.What changed
deprecationon the two tests that exercise the deprecated Unicode stream methods.libsql-conformancetest compile, which includes the vendored xerial sources.this-escapeon theLibsqlPreparedStatementconstructor 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
-XDsuppressNotesis 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-conformancemain sources keep the full lint set.Verification
clean verify: 2,006 tests, 0 failures, 7 skipped,BUILD SUCCESS.libsql-jdbcclean test: 1,510 tests, 0 failures, with nodeprecatedorthis-escapewarning.spotless:checkpasses.The JDK's
sun.misc.Unsafewarning from ByteBuddy is unrelated and remains.