airajena opened a new pull request, #5267:
URL: https://github.com/apache/fineract/pull/5267

   ## JIRA Ticket
   https://issues.apache.org/jira/browse/FINERACT-2421
   
   ## Description
   This PR simplifies the 
[getStringFromInputStream()](cci:1://file:///C:/Users/airaj/OneDrive/Desktop/gsoc/fineract/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java:55:4-63:5)
 method 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)
 by replacing manual BufferedReader-based conversion with Java 11+ 
`InputStream.readAllBytes()`.
   
   ## Changes
   - Replace manual InputStream to String conversion with 
`InputStream.readAllBytes()`
   - Remove unused imports: `BufferedReader`, `InputStreamReader`
   - Reduces code from 15 lines to 8 lines
   
   ## Why This Approach
   Java 11+ provides native `InputStream.readAllBytes()` which is:
   - Cleaner and more readable
   - Part of the standard library (no external dependency)
   - Properly handles UTF-8 encoding
   
   ## 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to