You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "airajena (via GitHub)" <gi...@apache.org> on 2025/12/27 07:45:38 UTC
[PR] Simplify InputStream to String conversion using Java 11+ API [fineract]
airajena opened a new pull request, #5265:
URL: https://github.com/apache/fineract/pull/5265
## Description
This PR addresses the TODO comment in [TemplateMergeService.java](cci:7://file:///C:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java:0:0-0:0) (line 58) that requested replacing the manual InputStream-to-String conversion with an appropriate alternative.
## Changes
- Replace manual `BufferedReader`-based InputStream to String conversion with Java 11+ `InputStream.readAllBytes()`
- Remove unused imports: `BufferedReader`, `InputStreamReader`
- Reduces code from 15 lines to 8 lines
## Why This Approach
The original TODO suggested using Guava, but Java 11+ provides native `InputStream.readAllBytes()` which:
- Is cleaner and more readable
- Is part of the standard library (no external dependency needed)
- Handles encoding with `StandardCharsets.UTF_8` properly
## Testing
- ✅ `./gradlew :fineract-provider:compileJava` passes
- ✅ `./gradlew :fineract-provider:compileTestJava` passes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify InputStream to String conversion using Java 11+ API [fineract]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on PR #5265:
URL: https://github.com/apache/fineract/pull/5265#issuecomment-3706878287
@adamsaghy actaully done the required changes
PR: https://github.com/apache/fineract/pull/5267
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify InputStream to String conversion using Java 11+ API [fineract]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena closed pull request #5265: Simplify InputStream to String conversion using Java 11+ API
URL: https://github.com/apache/fineract/pull/5265
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify InputStream to String conversion using Java 11+ API [fineract]
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #5265:
URL: https://github.com/apache/fineract/pull/5265#issuecomment-3706531409
@airajena Change of heart?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify InputStream to String conversion using Java 11+ API [fineract]
Posted by "Aman-Mittal (via GitHub)" <gi...@apache.org>.
Aman-Mittal commented on PR #5265:
URL: https://github.com/apache/fineract/pull/5265#issuecomment-3693823685
@airajena Can you rename commit and PR name to FINERACT-2421: Simplify InputStream to String conversion using Java 11+ API
according to development guidelines each pr must have a ticket
and preferrable branch name should be <Ticket-Name>/branch description
like FINERACT-2421/simplify-input-stream
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org