Skip to content

Commit

Permalink
chore: Fix PMD errorprone rules - NullAssignment
Browse files Browse the repository at this point in the history
  • Loading branch information
melbeltagy committed Oct 4, 2024
1 parent 27856dc commit 95eb0bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion config/pmd/custom-ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
<rule ref="category/java/errorprone.xml">
<exclude name="AvoidLiteralsInIfCondition"/>
<exclude name="MissingSerialVersionUID"/>
<exclude name="NullAssignment"/>
</rule>
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals">
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public StatusInfo() {
// Empty contructor
}

@SuppressWarnings("PMD.NullAssignment")
public void setTimestampsForSaved(LocalDateTime timestamp, boolean isModified) {
if (removed != null) {
changed = timestamp;
Expand All @@ -74,6 +75,7 @@ public boolean isRemoved() {
return removed != null;
}

@SuppressWarnings("PMD.NullAssignment")
public void setTimestampsForFetched(LocalDateTime timestamp) {
if (isRemoved()) {
// resurrect this item
Expand All @@ -86,6 +88,7 @@ public void setTimestampsForFetched(LocalDateTime timestamp) {
}
}

@SuppressWarnings("PMD.NullAssignment")
public void setTimestampsForNew(LocalDateTime timestamp) {
created = timestamp;
changed = timestamp;
Expand Down

0 comments on commit 95eb0bf

Please sign in to comment.