File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,7 @@ String good_replaceInnerLineBreakBySpace() {
448448 </example >
449449 </rule >
450450
451- <!-- CHANGED: Only match parameter-less constructor -->
451+ <!-- CHANGED: Only match parameter-less constructor (Optimization) -->
452452 <rule name =" AvoidInMemoryStreamingDefaultConstructor"
453453 language=" java"
454454 message=" Default buffer capacity is used which usually needs expensive expansions"
@@ -500,7 +500,7 @@ class Good {
500500
501501 Solution: Use a static field-to-enum-value Map. Access time is O(1), provided the hashCode is well-defined.
502502 Implement a fromString method to provide the reverse conversion by using the map.
503- </description >
503+ </description >
504504 <priority >3</priority >
505505 <properties >
506506 <property name =" xpath" >
@@ -565,7 +565,7 @@ public enum Fruit {
565565
566566 Solution: Usually a pattern is a literal, not dynamic and can be compiled only once. Assign it to a private static field.
567567 java.util.Pattern objects are thread-safe so they can be shared among threads.
568- </description >
568+ </description >
569569 <priority >2</priority >
570570 <properties >
571571 <property name =" xpath" >
You can’t perform that action at this time.
0 commit comments