Skip to content

Commit 2570345

Browse files
committed
fixes for pmd 7.17.0
1 parent 0123b4f commit 2570345

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

core/src/main/java/org/jdbi/v3/core/qualifier/QualifiedType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ public boolean equals(Object o) {
195195
public int hashCode() {
196196
int h = hashCode;
197197
if (h == 0) {
198-
hashCode = h = Objects.hash(type, qualifiers);
198+
h = Objects.hash(type, qualifiers);
199+
hashCode = h;
199200
}
200201
return h;
201202
}

internal/policy/src/main/resources/policy/pmd.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<exclude name="UnnecessaryConstructor"/>
6161
<exclude name="UselessParentheses"/>
6262
<exclude name="UseExplicitTypes" />
63+
<exclude name="TypeParameterNamingConventions" />
6364
</rule>
6465

6566
<rule ref="category/java/design.xml">
@@ -103,14 +104,24 @@
103104
<exclude name="ReturnEmptyCollectionRatherThanNull"/>
104105
<!-- exclude b/c TestingInitializers -->
105106
<exclude name="TestClassWithoutTestCases"/>
107+
<!-- see https://github.com/pmd/pmd/issues/6025 -->
108+
<exclude name="ReplaceJavaUtilCalendar"/>
109+
<exclude name="ReplaceJavaUtilDate"/>
106110
</rule>
111+
107112
<rule ref="category/java/errorprone.xml/EmptyCatchBlock">
108113
<properties>
109114
<property name="allowCommentedBlocks" value="true"/>
110115
<property name="allowExceptionNameRegex" value="^(ignored?|expected)$"/>
111116
</properties>
112117
</rule>
113118

119+
<rule ref="category/java/errorprone.xml/AssignmentInOperand">
120+
<properties>
121+
<property name="allowIncrementDecrement" value="true" />
122+
</properties>
123+
</rule>
124+
114125
<rule ref="category/java/multithreading.xml">
115126
<exclude name="AvoidSynchronizedStatement"/>
116127
<exclude name="AvoidUsingVolatile"/>

0 commit comments

Comments
 (0)