Skip to content

Commit

Permalink
Add spotbug checks for pulsar-config-validation module (apache#9034)
Browse files Browse the repository at this point in the history
### Motivation

Add spotbug checks for pulsar-config-validation module.

### Modifications

The only failure check is the redundant null check, so we just remove the null check.

### Verifying this change

- [ ] Make sure that the change passes the CI checks.

*(Please pick either of the following options)*

This change is a trivial rework / code cleanup without any test coverage.
  • Loading branch information
BewareMyPower authored Dec 23, 2020
1 parent ab9c77a commit 74a6739
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 10 additions & 0 deletions pulsar-config-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,14 @@
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs-maven-plugin.version}</version>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ public void validateField(String pd, String name, Object field)
return;
}
throw new IllegalArgumentException(
"Field " + name + " must be an Iterable but was "
+ ((field == null) ? "null" : ("a " + field.getClass())));
"Field " + name + " must be an Iterable but was a " + field.getClass());
}
};
}
Expand Down

0 comments on commit 74a6739

Please sign in to comment.