Skip to content

Conversation

@overcat
Copy link
Member

@overcat overcat commented Jul 23, 2025

No description provided.

@overcat overcat requested a review from Copilot July 23, 2025 00:55
Copy link

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

This PR fixes unnecessary padding operations in XDR data streams by adding conditional checks to only perform padding when data is actually written or read. The changes improve performance by avoiding padding operations when no data transfer occurs (length/read ≤ 0).

  • Added conditional checks in XDR input/output streams to skip padding when no data is processed
  • Updated version references from 1.5.0 to 1.5.1 across documentation and build files
  • Added changelog entry documenting the XDR padding optimization

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/java/org/stellar/sdk/xdr/XdrDataOutputStream.java Added length > 0 check before padding operations
src/main/java/org/stellar/sdk/xdr/XdrDataInputStream.java Added read > 0 check before padding operations
readme.md Updated version references from 1.5.0 to 1.5.1
examples/build.gradle.kts Updated dependency version to 1.5.1
android_test/app/build.gradle.kts Updated JAR file reference to 1.5.1
CHANGELOG.md Added entry for version 1.5.1 with XDR padding fix

@codecov
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.20%. Comparing base (dc2b705) to head (8e103ed).
Report is 2 commits behind head on release/1.5.1.

Additional details and impacted files
@@                 Coverage Diff                 @@
##             release/1.5.1     #720      +/-   ##
===================================================
- Coverage            80.23%   80.20%   -0.04%     
  Complexity            1228     1228              
===================================================
  Files                  213      213              
  Lines                 4853     4855       +2     
  Branches               413      414       +1     
===================================================
  Hits                  3894     3894              
- Misses                 705      707       +2     
  Partials               254      254              
Files with missing lines Coverage Δ
...sdk/operations/ClaimClaimableBalanceOperation.java 76.19% <100.00%> (-8.03%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@overcat overcat merged commit 878b8ea into release/1.5.1 Jul 23, 2025
4 of 5 checks passed
@overcat overcat deleted the fix/stream-read branch July 23, 2025 02:19
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