You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "chhs2131 (via GitHub)" <gi...@apache.org> on 2026/01/25 13:22:28 UTC

[PR] [LANG-1452] Exclude BigDecimal and BigInteger from recursive formatti… [commons-lang]

chhs2131 opened a new pull request, #1582:
URL: https://github.com/apache/commons-lang/pull/1582

   ## Overview
   Addresses LANG-1452 by excluding `BigDecimal` and `BigInteger` from recursive formatting in `MultilineRecursiveToStringStyle` to prevent exposing internal implementation fields.
   
   ## Changes
   - Override `accept(Class<?>)` method to return `false` for `BigDecimal` and `BigInteger`
   - Add `BigInteger` import
   - Update Javadoc to document the exclusion
   - Add `testBigDecimalField()` test case
   - Add `testBigIntegerField()` test case
   
   ## Why
   `MultilineRecursiveToStringStyle` was recursively formatting `BigDecimal` and `BigInteger` objects, exposing internal fields like `intVal`, `scale`, `mag`, and `signum` instead of their string values. This follows the intended design pattern of `RecursiveToStringStyle`, where subclasses can override `accept()` to filter specific classes from recursive processing.


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [LANG-1452] RecursiveToStringStyle and MultilineRecursiveToStringStyle shouldn't recurse into a java.math.BigDecimal [commons-lang]

Posted by "chhs2131 (via GitHub)" <gi...@apache.org>.
chhs2131 commented on PR #1582:
URL: https://github.com/apache/commons-lang/pull/1582#issuecomment-3796706027

   @garydgregory
   Got it! We use this project regularly in our product development and really appreciate it. Thanks for all your hard work! 😊


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [LANG-1452] RecursiveToStringStyle and MultilineRecursiveToStringStyle shouldn't recurse into a java.math.BigDecimal [commons-lang]

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #1582:
URL: https://github.com/apache/commons-lang/pull/1582#issuecomment-3796729267

   YW! 👋 


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [LANG-1452] RecursiveToStringStyle and MultilineRecursiveToStringStyle shouldn't recurse into a java.math.BigDecimal [commons-lang]

Posted by "chhs2131 (via GitHub)" <gi...@apache.org>.
chhs2131 closed pull request #1582: [LANG-1452] RecursiveToStringStyle and MultilineRecursiveToStringStyle shouldn't recurse into a java.math.BigDecimal
URL: https://github.com/apache/commons-lang/pull/1582


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [LANG-1452] RecursiveToStringStyle and MultilineRecursiveToStringStyle shouldn't recurse into a java.math.BigDecimal [commons-lang]

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #1582:
URL: https://github.com/apache/commons-lang/pull/1582#issuecomment-3796681212

   Hello @chhs2131 
   
   Thank you for your PR but it's redundant with what I was already working on in #1584, which contains additional cases and tests.
   


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [LANG-1452] Exclude BigDecimal and BigInteger from recursive formatti… [commons-lang]

Posted by "chhs2131 (via GitHub)" <gi...@apache.org>.
chhs2131 closed pull request #1582: [LANG-1452] Exclude BigDecimal and BigInteger from recursive formatti…
URL: https://github.com/apache/commons-lang/pull/1582


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org