java-21-fixes-20260911 - #251
Merged
Merged
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
It changes production-facing GCS read/write behavior via external N5 APIs and should be validated with integration/runtime testing before approval.
Pull request overview
This PR updates the Java clients to align with the repository’s Java 21 target and modern N5 Google Cloud Storage APIs, while also correcting GCS key derivation by consistently using full gs://... URIs instead of uri.getPath().
Changes:
- Replace
list.get(0)with Java 21getFirst()calls in several single-element list access sites. - Update GCS image writing in
RenderTilesClientto useKeyValueAccess.write(fullUri, ReadData)instead ofLockedChannel+uri.getPath(). - Update GCS JSON reading in
PeakScanDatato usecreateReadData(fullUri)+ UTF-8InputStreamReaderinstead ofLockedChannel+uri.getPath().
File summaries
| File | Description |
|---|---|
| render-ws-java-client/src/main/java/org/janelia/render/client/tile/RenderTilesClient.java | Uses Java 21 getFirst() and switches cloud writes to KeyValueAccess.write with full gs:// URIs to avoid incorrect object key derivation. |
| render-ws-java-client/src/main/java/org/janelia/render/client/multisem/PeakScanData.java | Switches cloud reads to createReadData(fullUri) and explicitly reads JSON as UTF-8 to avoid incorrect key derivation and charset ambiguity. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
No description provided.