Skip to content

docs: add missing Javadoc comments for various classes and methods#783

Merged
overcat merged 4 commits intomasterfrom
add-missing-docs
Apr 16, 2026
Merged

docs: add missing Javadoc comments for various classes and methods#783
overcat merged 4 commits intomasterfrom
add-missing-docs

Conversation

@overcat
Copy link
Copy Markdown
Member

@overcat overcat commented Apr 16, 2026

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.42%. Comparing base (874baae) to head (ddeec79).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...tellar/sdk/exception/UnknownResponseException.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #783   +/-   ##
=========================================
  Coverage     81.42%   81.42%           
  Complexity     1473     1473           
=========================================
  Files           220      220           
  Lines          5530     5530           
  Branches        568      568           
=========================================
  Hits           4503     4503           
  Misses          717      717           
  Partials        310      310           
Files with missing lines Coverage Δ
...main/java/org/stellar/sdk/AbstractTransaction.java 75.00% <ø> (ø)
src/main/java/org/stellar/sdk/Asset.java 88.09% <ø> (ø)
.../java/org/stellar/sdk/AssetTypeCreditAlphaNum.java 85.71% <ø> (ø)
...rc/main/java/org/stellar/sdk/ChangeTrustAsset.java 82.75% <ø> (ø)
.../main/java/org/stellar/sdk/FeeBumpTransaction.java 88.60% <ø> (ø)
src/main/java/org/stellar/sdk/KeyPair.java 86.77% <ø> (ø)
src/main/java/org/stellar/sdk/LedgerBounds.java 100.00% <ø> (ø)
src/main/java/org/stellar/sdk/LiquidityPool.java 80.64% <ø> (ø)
src/main/java/org/stellar/sdk/Memo.java 88.23% <ø> (ø)
...rc/main/java/org/stellar/sdk/MemoHashAbstract.java 88.88% <ø> (ø)
... and 48 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds/updates Javadoc across the Java Stellar SDK to improve generated API documentation coverage, especially around Horizon request/response models and Stellar RPC (formerly Soroban-RPC) types.

Changes:

  • Add package-level package-info.java Javadocs for several SDK packages (core, requests, responses, operations, federation, SPI, contract exceptions).
  • Add/expand class/method/field Javadocs across request builders, response models, core domain types, and exceptions.
  • Rename documentation references from “Soroban-RPC” to “Stellar RPC (formerly Soroban-RPC)” in multiple places, and adjust some exception/throws docs.

Reviewed changes

Copilot reviewed 80 out of 80 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/main/java/org/stellar/sdk/spi/package-info.java Adds SPI package-level Javadoc.
src/main/java/org/stellar/sdk/responses/sorobanrpc/package-info.java Adds Stellar RPC responses package-level Javadoc.
src/main/java/org/stellar/sdk/responses/sorobanrpc/SorobanRpcResponse.java Updates class Javadoc wording for Stellar RPC.
src/main/java/org/stellar/sdk/responses/sorobanrpc/Events.java Adds class-level Javadoc for event parsing container.
src/main/java/org/stellar/sdk/responses/package-info.java Adds Horizon responses package-level Javadoc.
src/main/java/org/stellar/sdk/responses/operations/package-info.java Adds operation responses package-level Javadoc.
src/main/java/org/stellar/sdk/responses/gson/package-info.java Adds Gson adapters package-level Javadoc.
src/main/java/org/stellar/sdk/responses/effects/package-info.java Adds effects package-level Javadoc.
src/main/java/org/stellar/sdk/responses/effects/LiquidityPool.java Adds class-level Javadoc for effect liquidity pool model.
src/main/java/org/stellar/sdk/responses/TradeAggregationResponse.java Adds class-level Javadoc for trade aggregations response.
src/main/java/org/stellar/sdk/responses/Response.java Adds base response class Javadoc.
src/main/java/org/stellar/sdk/responses/Pageable.java Adds interface-level Javadoc for pagination token.
src/main/java/org/stellar/sdk/responses/Page.java Fixes throws text in Javadoc (NetworkErrorNetworkException).
src/main/java/org/stellar/sdk/responses/FeeStatsResponse.java Adds class-level Javadoc for fee stats response.
src/main/java/org/stellar/sdk/responses/AssetResponse.java Adds class-level Javadoc for asset response.
src/main/java/org/stellar/sdk/requests/sorobanrpc/package-info.java Adds Stellar RPC requests package-level Javadoc.
src/main/java/org/stellar/sdk/requests/sorobanrpc/SorobanRpcRequest.java Updates class Javadoc wording for Stellar RPC.
src/main/java/org/stellar/sdk/requests/package-info.java Adds Horizon requests package-level Javadoc with usage example.
src/main/java/org/stellar/sdk/requests/TransactionsRequestBuilder.java Adds missing @return/@param docs and fixes throws text.
src/main/java/org/stellar/sdk/requests/TradesRequestBuilder.java Adds missing @return docs and fixes throws text.
src/main/java/org/stellar/sdk/requests/TradeAggregationsRequestBuilder.java Fixes throws text (NetworkErrorNetworkException).
src/main/java/org/stellar/sdk/requests/StrictSendPathsRequestBuilder.java Adds class-level Javadoc and fixes throws text.
src/main/java/org/stellar/sdk/requests/StrictReceivePathsRequestBuilder.java Fixes throws text (NetworkErrorNetworkException).
src/main/java/org/stellar/sdk/requests/SSEStream.java Adds class-level Javadoc for SSE streaming helper.
src/main/java/org/stellar/sdk/requests/RootRequestBuilder.java Fixes throws text (NetworkErrorNetworkException).
src/main/java/org/stellar/sdk/requests/ResponseHandler.java Adds class/method Javadocs describing HTTP→exception mapping.
src/main/java/org/stellar/sdk/requests/RequestBuilder.java Adds missing @return docs and fixes spelling/throws text.
src/main/java/org/stellar/sdk/requests/PaymentsRequestBuilder.java Adds missing @return docs and fixes throws text.
src/main/java/org/stellar/sdk/requests/OrderBookRequestBuilder.java Fixes throws text and documents stream overload.
src/main/java/org/stellar/sdk/requests/OperationsRequestBuilder.java Adds missing @return/@param docs and fixes throws text.
src/main/java/org/stellar/sdk/requests/OffersRequestBuilder.java Adds missing @param docs and fixes throws text.
src/main/java/org/stellar/sdk/requests/LiquidityPoolsRequestBuilder.java Adds missing @param docs and fixes throws text.
src/main/java/org/stellar/sdk/requests/LedgersRequestBuilder.java Adds missing @param docs and fixes throws text.
src/main/java/org/stellar/sdk/requests/FeeStatsRequestBuilder.java Adds class-level Javadoc and fixes throws text.
src/main/java/org/stellar/sdk/requests/EffectsRequestBuilder.java Adds missing @return docs; contains a Javadoc link typo.
src/main/java/org/stellar/sdk/requests/ClientIdentificationInterceptor.java Adds class-level Javadoc for header injection interceptor.
src/main/java/org/stellar/sdk/requests/ClaimableBalancesRequestBuilder.java Adds missing @param docs and fixes throws text.
src/main/java/org/stellar/sdk/requests/AssetsRequestBuilder.java Adds class-level Javadoc and fixes throws text.
src/main/java/org/stellar/sdk/requests/AccountsRequestBuilder.java Adds missing @param/@return docs and fixes throws text.
src/main/java/org/stellar/sdk/package-info.java Adds core SDK package-level Javadoc.
src/main/java/org/stellar/sdk/operations/package-info.java Adds operations package-level Javadoc.
src/main/java/org/stellar/sdk/federation/package-info.java Adds federation package-level Javadoc.
src/main/java/org/stellar/sdk/federation/exception/package-info.java Adds federation exceptions package-level Javadoc.
src/main/java/org/stellar/sdk/federation/FederationResponse.java Expands field Javadocs for Lombok-generated getters.
src/main/java/org/stellar/sdk/federation/Federation.java Fixes throws text (NetworkErrorNetworkException).
src/main/java/org/stellar/sdk/exception/UnknownResponseException.java Adds class Javadoc and changes exception message text.
src/main/java/org/stellar/sdk/exception/SorobanRpcException.java Updates Javadoc to Stellar RPC wording.
src/main/java/org/stellar/sdk/exception/PrepareTransactionException.java Updates inline comment to Stellar RPC wording.
src/main/java/org/stellar/sdk/exception/NetworkException.java Expands field Javadocs for Lombok-generated getters.
src/main/java/org/stellar/sdk/exception/AccountNotFoundException.java Updates Javadoc wording to Stellar RPC.
src/main/java/org/stellar/sdk/contract/exception/package-info.java Adds contract exceptions package-level Javadoc.
src/main/java/org/stellar/sdk/contract/AssembledTransaction.java Adds class-level Javadoc describing lifecycle/usage.
src/main/java/org/stellar/sdk/Util.java Adds missing @return Javadoc for an assertion helper.
src/main/java/org/stellar/sdk/TrustLineAsset.java Expands field Javadocs for Lombok-generated getters.
src/main/java/org/stellar/sdk/TransactionPreconditions.java Expands field Javadocs for Lombok-generated getters/builders.
src/main/java/org/stellar/sdk/TransactionBuilderAccount.java Expands interface method Javadocs.
src/main/java/org/stellar/sdk/TransactionBuilder.java Adds missing @return Javadoc for build().
src/main/java/org/stellar/sdk/Transaction.java Expands field Javadocs for public getters.
src/main/java/org/stellar/sdk/TimeBounds.java Expands field Javadocs for Lombok-generated getters.
src/main/java/org/stellar/sdk/SorobanServer.java Updates Javadocs from Soroban-RPC to Stellar RPC wording.
src/main/java/org/stellar/sdk/SorobanDataBuilder.java Updates wording + expands nested Resources field Javadocs.
src/main/java/org/stellar/sdk/SignerKey.java Expands field Javadocs for Lombok-generated getters.
src/main/java/org/stellar/sdk/Server.java Expands/adjusts Javadocs and corrects a return type doc.
src/main/java/org/stellar/sdk/Sep45Challenge.java Updates wording + expands nested value object field Javadocs.
src/main/java/org/stellar/sdk/Sep10Challenge.java Adds missing @return docs for challenge constructors.
src/main/java/org/stellar/sdk/Price.java Expands field/method Javadocs.
src/main/java/org/stellar/sdk/Predicate.java Expands nested predicate field Javadocs.
src/main/java/org/stellar/sdk/Network.java Expands field Javadoc for passphrase getter.
src/main/java/org/stellar/sdk/MuxedAccount.java Expands field Javadocs for getters.
src/main/java/org/stellar/sdk/MemoHashAbstract.java Expands field/method Javadocs for getter-like methods.
src/main/java/org/stellar/sdk/Memo.java Adds missing @return docs for memo factory methods.
src/main/java/org/stellar/sdk/LiquidityPool.java Expands field Javadocs for getters.
src/main/java/org/stellar/sdk/LedgerBounds.java Expands field Javadocs for Lombok-generated getters.
src/main/java/org/stellar/sdk/KeyPair.java Expands method Javadocs (canSign, getAccountId, etc.).
src/main/java/org/stellar/sdk/FeeBumpTransaction.java Expands field Javadocs for getters.
src/main/java/org/stellar/sdk/Claimant.java Expands field Javadocs for Lombok-generated getters.
src/main/java/org/stellar/sdk/ChangeTrustAsset.java Expands field Javadocs for Lombok-generated getters.
src/main/java/org/stellar/sdk/AssetTypeCreditAlphaNum.java Expands field Javadocs for getters.
src/main/java/org/stellar/sdk/Asset.java Adds missing @return docs and expands method Javadocs.
src/main/java/org/stellar/sdk/AbstractTransaction.java Expands field/method Javadocs for getters and factory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 7 to 9
/**
* Represent the request sent to Soroban-RPC.
* Represent the request sent to Stellar RPC (formerly Soroban-RPC).
*
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class Javadoc is grammatically incorrect: “Represent the request …” should be “Represents the request …”.

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +14
public UnknownResponseException(Integer code, String body) {
super(String.format("Unknown response from Horizon: [%d] %s", code, body), code, body);
super(String.format("Unknown response: [%d] %s", code, body), code, body);
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is titled as a Javadoc-only change, but this line changes a public exception message (removes “from Horizon”). If this is intentional, consider noting it in the PR description/release notes; otherwise, keep the original message or switch to a neutral wording like “from server” to avoid surprising consumers who log/grep for the old text.

Copilot uses AI. Check for mistakes.
Comment on lines +32 to 38
/**
* The time bounds for the transaction.
*
* @param timeBounds the time bounds
* @return the time bounds
*/
TimeBounds timeBounds;
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field Javadoc includes an @param timeBounds tag, but this is a field (not a method/constructor), so the tag is invalid and can trigger doclint warnings or get copied onto Lombok-generated getters where it will be unused. Consider removing @param tags from field Javadoc (keep @return for generated getters) and document builder/constructor params separately if needed.

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +36
* submitHttpClient is used only for submitting transactions. The read timeout is longer.
*
* @param submitHttpClient the OkHttpClient used for submitting transactions
* @return the OkHttpClient used for submitting transactions
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This submitHttpClient field Javadoc includes @param/@return tags, which are not valid on fields and may be copied onto Lombok-generated accessor methods where the tags don’t match (e.g., setters have params but no return; getters have return but no params). Prefer field Javadoc without method tags, or provide explicit getter/setter Javadocs if doclint completeness is required.

Suggested change
* submitHttpClient is used only for submitting transactions. The read timeout is longer.
*
* @param submitHttpClient the OkHttpClient used for submitting transactions
* @return the OkHttpClient used for submitting transactions
* HTTP client used only for submitting transactions. The read timeout is longer.

Copilot uses AI. Check for mistakes.
Comment on lines +652 to 658
/**
* The list of authorization entries.
*
* @param authorizationEntries the authorization entries
* @return the authorization entries
*/
@NonNull List<SorobanAuthorizationEntry> authorizationEntries;
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These Lombok @Value/@Builder fields have Javadoc with @param tags even though they are fields. This is invalid at the field level and can lead to doclint warnings or mismatched tags when Lombok copies comments onto generated methods. Consider removing the @param tags from field Javadocs (keeping @return for generated getters).

Copilot uses AI. Check for mistakes.
Comment on lines 5 to 7
/**
* Throws when Soroban-RPC instance responds with error.
* Throws when Stellar RPC (formerly Soroban-RPC) instance responds with error.
*
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Javadoc grammar: “Throws when … instance responds with error.” should be “Thrown when a … instance responds with an error.” (or similar).

Copilot uses AI. Check for mistakes.
Comment on lines 6 to 9
* Exception thrown when trying to load an account that doesn't exist on the Stellar network.
*
* <p>Only applicable to Soroban RPC Request.
* <p>Only applicable to Stellar RPC request.
*/
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor grammar: “Only applicable to Stellar RPC request.” reads like a typo; consider “requests” (plural) or “a Stellar RPC request”.

Copilot uses AI. Check for mistakes.
Comment on lines +155 to 161
/**
* number of CPU instructions (uint32)
*
* @param cpuInstructions the number of CPU instructions
* @return the number of CPU instructions
*/
@NonNull Long cpuInstructions;
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Resources, the field Javadocs include @param ... tags even though these are fields. This is invalid for field Javadoc and may surface as doclint warnings or be copied onto Lombok-generated getters (which have no parameters). Consider removing the @param tags from these field comments and keeping only an appropriate @return for getters.

Copilot uses AI. Check for mistakes.
Comment on lines 63 to 65
* @see <a
* href="ttps://developers.stellar.org/docs/data/apis/horizon/api-reference/retrieve-related-effects">Effects
* for Liquidity Pool</a>
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @see link URL is missing the leading h (ttps://...), so it won’t be clickable/valid in generated Javadoc. Update it to https://....

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 80 out of 80 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 56 to +61
* @throws TooManyRequestsException If the response code is 429 (Too Many Requests)
* @throws RequestTimeoutException If the response code is 504 (Gateway Timeout)
* @throws UnexpectedException If the response body is empty or there's an unexpected error
* reading the response
* @throws BadRequestException If the response code is in the 4xx range
* @throws BadResponseException If the response code is in the 5xx range
* @throws BadRequestException If the response code is in the 4xx range (except 429)
* @throws BadResponseException If the response code is in the 5xx range (except 504)
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleResponse(Response) can also throw UnknownResponseException (e.g., for 3xx responses or any status code outside 2xx/4xx/5xx), but the updated @throws list doesn’t mention it. Since the class-level Javadoc calls out UnknownResponseException for unrecognized status codes, it would be good to include it in the method-level @throws list as well (and similarly for the overloads) to keep the documentation accurate.

Copilot uses AI. Check for mistakes.
@overcat overcat enabled auto-merge (squash) April 16, 2026 08:52
@overcat overcat requested a review from Copilot April 16, 2026 08:57
@overcat overcat disabled auto-merge April 16, 2026 08:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 80 out of 80 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +7 to +12
/**
* Abstract base class for all Horizon API response objects.
*
* <p>Provides common utility methods shared by Horizon responses, such as constructing {@link
* org.stellar.sdk.TrustLineAsset} instances from response fields.
*/
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Response is documented as the base class for "all Horizon API response objects", but it is also extended by Stellar RPC response types (e.g., org.stellar.sdk.responses.sorobanrpc.SorobanRpcResponse). Please adjust this Javadoc to describe it as a shared base for SDK response objects (or explicitly mention both Horizon and Stellar RPC) to avoid misleading API consumers.

Copilot uses AI. Check for mistakes.
@overcat overcat merged commit 96214a1 into master Apr 16, 2026
11 checks passed
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.

2 participants