Skip to content

[demo of #2544] [chore] SDK examples: Java v3.1.0 audit - #21

Open
kaankacar wants to merge 1 commit into
mainfrom
demo/pr-2544
Open

[demo of #2544] [chore] SDK examples: Java v3.1.0 audit#21
kaankacar wants to merge 1 commit into
mainfrom
demo/pr-2544

Conversation

@kaankacar

Copy link
Copy Markdown
Owner

Updating the Java code examples to the most up-to-date version of the SDK available (v3.1.0 at time of writing)


Demo replay of stellar#2544 (original author: ElliotFriend) — seeded for the triage-agent demo.

@github-actions

Copy link
Copy Markdown

🤖 Claude docs review

READY-FOR-HUMAN-APPROVAL

Mechanics

  • ✓ No internal links touched (nothing to check for relative/absolute convention)
  • ✓ No headings or image/alt-text changed
  • ✓ Diff is Java code-block only; no other languages' samples touched
  • ✓ mdx-format check passing; build / review checks were still in progress at review time — worth a glance before merge

Technical accuracy — verified every changed API surface against lightsail-network/java-stellar-sdk tag 3.1.0 (the version this PR claims to target, per the network.lightsail:stellar-sdk:3.1.0 Maven coordinate in docs/build/guides/transactions/create-account.mdx):

  • CreateAccountOperation, PaymentOperation, ChangeTrustOperation, SetOptionsOperation, SetTrustlineFlagsOperation, InvokeHostFunctionOperation all live under org.stellar.sdk.operations in 3.1.0, and now use Lombok builder()/build() instead of the old new Foo.Builder(...) constructors — matches the diff.
  • AccountNotFoundException, PrepareTransactionException, SorobanRpcException are now under org.stellar.sdk.exception; the old org.stellar.sdk.requests.sorobanrpc.SorobanRpcErrorResponse no longer exists in the 3.1.0 tree — the rename in invoke-contract-tx-sdk.mdx and stellar-transaction.mdx is correct.
  • Asset.createNonNativeAsset(...) returns Asset (not AssetTypeCreditAlphaNum12) — the create-account.mdx variable type change is correct.
  • ChangeTrustOperation.asset is typed ChangeTrustAsset, and ChangeTrustAsset(Asset) is a real constructor — the new ChangeTrustAsset(astroDollar) wrapping in how-to-issue-an-asset.mdx is correct.
  • PaymentOperation.amount, ChangeTrustOperation.limit, CreateAccountOperation.startingBalance are all BigDecimal in 3.1.0 (previously String) — the new BigDecimal("...") changes are correct, and SetTrustlineFlagsOperation.asset remains a plain Asset (not ChangeTrustAsset), which the diff also gets right.
  • SetTrustlineFlagsOperation (lowercase "line", renamed from SetTrustLineFlagsOperation) and its trustor/setFlags(EnumSet) fields are accurate.

No inaccuracies found. I did not find a corresponding open issue in this repo tracking a stale Java SDK audit — this PR's own description states it's a demo replay of the upstream stellar#2544 (still open there), seeded for the triage-agent demo, so it isn't closing a tracked item here.

Non-blocking nits

  • docs/tokens/how-to-issue-an-asset.mdx's lockAccountTransaction and SetTrustlineFlagsOperation snippets remain illustrative/incomplete (missing outer .build()/imports) — pre-existing in the file, not introduced by this PR, just flagging since it's adjacent to the touched lines.
  • Diff is 101 lines (58+/43-) across 6 files, so it's outside the ~10-line trivial-tier threshold regardless of how clean the change is — leaving unlabeled for a human merge decision.

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