deprecate-auto-endpoint: deprecate ScaniiTarget.AUTO#112
Merged
Conversation
Marks ScaniiTarget.AUTO and the no-target createDefault(key, secret) overload as @deprecated(since="8.2.0"). Building a client without an explicit .target() now emits a runtime System.err warning pointing to the regional constants (US1, EU1, etc.) for data residency compliance. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
rferreira
commented
May 5, 2026
| throw new IllegalStateException("credentials or authToken must be set"); | ||
| } | ||
| if (target == ScaniiTarget.AUTO) { | ||
| System.err.println("[scanii] DEPRECATION: No explicit target set; defaulting to ScaniiTarget.AUTO " + |
Contributor
Author
There was a problem hiding this comment.
Don't do this, it's too aggressive
Per review feedback, the annotation-only approach (@deprecated on ScaniiTarget.AUTO and createDefault(key, secret)) is sufficient. Runtime stderr noise is too aggressive for a library. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
rferreira
commented
May 5, 2026
rferreira
left a comment
Contributor
Author
There was a problem hiding this comment.
Removed the runtime stderr warning from build() — annotation-only deprecation per review feedback. CHANGELOG updated to match.
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.
Summary
ScaniiTarget.AUTOmarked@Deprecated(since = "8.2.0")with javadoc pointing toUS1,EU1, etc.ScaniiClients.createDefault(String key, String secret)(no-target overload) marked@Deprecated(since = "8.2.0")ScaniiClientBuilder.build()emits aSystem.errwarning at runtime when no explicit target is set@SuppressWarnings("deprecation")to keep CI clean while still exercising the deprecated pathpom.xmlleft at1.0.0-SNAPSHOTper the Maven release plugin conventionTracking
Part of uvasoftware/sdks#1 — reference SDK, locks deprecation annotation style for the 6 remaining fan-out SDKs.
🤖 Generated with Claude Code