nidhiii128 commented on PR #5410:
URL: https://github.com/apache/fineract/pull/5410#issuecomment-3824935347

   @IOhacker, I appreciate the point regarding StringBuilder, as it is 
traditionally used in Fineract to manage multi-line SQL. However, I believe 
Java 15 Text Blocks are the more technically sound choice here.
   Since this SQL query is a static constant and doesn't require conditional 
appending, the Java compiler internizes the Text Block into the String Constant 
Pool. Using StringBuilder would introduce unnecessary heap allocation and 
runtime .append() calls for a string that never changes.
   While Text Blocks eliminate the 'missing space' risk often found in String 
concatenation ("LINE1"+"LINE2"). It allows us to keep the SQL formatting 
identical to the source database schema, which simplifies future debugging of 
the SUM and COALESCE logic and also given that Fineract has upgraded Text 
Blocks helps reduce boilerplate code.


-- 
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