Skip to content

Add overloaded signing util methods - #649

Merged
drallgood merged 4 commits into
drallgood:mainfrom
singlemusic:signing-output-streams
Jul 6, 2026
Merged

Add overloaded signing util methods#649
drallgood merged 4 commits into
drallgood:mainfrom
singlemusic:signing-output-streams

Conversation

@josephtaylor

Copy link
Copy Markdown
Contributor

New IPKSigningUtil methods and implementation in both PKFileBasedSigningUtil
and PKInMemorySigningUtil that allow callers to provide an OutputStream that
the signed pass will be written to.

This allows callers to stream the output wherever they want without
holding the entire signed pass in memory as a byte array.

New IPKSigningUtil methods and implementation in both PKFileBasedSigningUtil
and PKInMemorySigningUtil that allow callers to provide an OutputStream that
the signed pass will be written to.

This allows callers to stream the output wherever they want without
holding the entire signed pass in memory as a byte array.
@CLAassistant

CLAassistant commented Oct 8, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@drallgood

Copy link
Copy Markdown
Owner

ooh.. I like that idea. Thanks @josephtaylor

@drallgood

Copy link
Copy Markdown
Owner

@josephtaylor could you please pull in main again? I fixed the certificate error so tests should pass now

@josephtaylor

Copy link
Copy Markdown
Contributor Author

@drallgood apologies for the delay here, just got main merged down into the branch

@drallgood

drallgood commented Jul 3, 2026

Copy link
Copy Markdown
Owner

LGTM ✅
Nice improvement adding OutputStream-based signing overloads. This is a meaningful API enhancement for memory-sensitive paths and streaming use cases, and the change appears additive/backward-compatible.

I especially like that this is implemented across both signing util implementations so behavior stays consistent regardless of backing strategy.

Nits / follow-ups (non-blocking):

Please ensure Javadocs clearly define stream ownership (whether the callee closes the provided OutputStream).
If not already covered, add/confirm tests that verify parity between byte-array and stream overload outputs.
Consider a targeted large-pass test to validate the intended memory benefit path.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 81.81818% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.28%. Comparing base (d48443d) to head (1ce89c8).

Files with missing lines Patch % Lines
...amour/jpasskit/signing/PKPassTemplateInMemory.java 42.85% 4 Missing ⚠️

❌ Your project status has failed because the head coverage (81.28%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #649      +/-   ##
============================================
- Coverage     81.37%   81.28%   -0.09%     
- Complexity      749      753       +4     
============================================
  Files            59       59              
  Lines          1648     1662      +14     
  Branches         58       58              
============================================
+ Hits           1341     1351      +10     
- Misses          255      259       +4     
  Partials         52       52              
Flag Coverage Δ
unittests 81.28% <81.81%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...amour/jpasskit/signing/PKFileBasedSigningUtil.java 71.08% <100.00%> (+1.46%) ⬆️
...damour/jpasskit/signing/PKInMemorySigningUtil.java 69.69% <100.00%> (+2.48%) ⬆️
...amour/jpasskit/signing/PKPassTemplateInMemory.java 93.44% <42.85%> (-6.56%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@drallgood
drallgood merged commit 9575c30 into drallgood:main Jul 6, 2026
8 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.

4 participants