You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suggestion: Sonar S2129 Constructors should not be used to instantiate "String", "BigInteger", "BigDecimal" and primitive-wrapper classes #1066
While analyzing your project using our Automatic bug fixing software, i noticed that sonar rule S2129 was sometimes violated. If you wish, I can offer you a correction in the form of a PR.
https://sonarcloud.io/organizations/default/rules?open=java%3AS2129&q=S2129
"Calling constructors for String, BigInteger, BigDecimal and the objects used to wrap primitives is less efficient and less clear than relying on autoboxing or valueOf.
Consider simplifying when possible for more efficient and cleaner code."
Below are examples of the changes made by our software to correct this rule.
Activity
josemduarte commentedon Jun 26, 2023
That seems reasonable to me, thanks. Happy to review a PR.
Sonar S2129 Constructors should not be used to instantiate 'String', …
jlerbsc commentedon Jun 27, 2023
The corresponding PR is #1067