Skip to content

Commit 6882b45

Browse files
committed
PMF: Cleanup and format
1 parent 042b7a4 commit 6882b45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.config/pmd/java/ruleset.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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">

0 commit comments

Comments
 (0)