rspec/rules/S2131/java/comments-and-links.adoc

19 lines
1.2 KiB
Plaintext
Raw Normal View History

=== on 10 Oct 2014, 13:57:44 Freddy Mallet wrote:
Perfect @Ann, I would just add the word "just" in the title :
"Primitives should not be boxed just for 'String' conversion"
=== on 12 Oct 2014, 16:49:26 Freddy Mallet wrote:
@Ann, I guess this rule should be associated to Findbugs rule DM_BOXED_PRIMITIVE_TOSTRING
=== on 14 Oct 2014, 14:50:53 Ann Campbell wrote:
Yes, thanks.
=== on 15 Sep 2017, 16:48:12 Michael Gumowski wrote:
Updated RSPEC to remove example of a constant concatenated with an empty String, accordingly to SONARJAVA-2452. Concatenation of literals with empty string (or any String literal) is valid and will produce an optimized string when compiled into bytecode.
=== on 27 Sep 2017, 11:28:58 Tibor Blenessy wrote:
Removing string concatenation altogether from this rule because, as described in \https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.18.1 modern Java compilers can and do optimize string concatenation of primitive values. Furthermore concatenation can be effectively optimized by JIT and trying to be smart may circumvent these optimizations. See for example \http://openjdk.java.net/jeps/280 . Implemented in SONARJAVA-2481