Java lint fixes
Properly use the Java Class<T> type signatures in the
immutability and utility class checkers.
Change-Id: Ibe96c6a35d54a54cb09bd0bce6bde9f0dfe25410
diff --git a/src/test/java/net/onrc/onos/core/util/ImmutableClassChecker.java b/src/test/java/net/onrc/onos/core/util/ImmutableClassChecker.java
index 12c9b0f..ac7e099 100644
--- a/src/test/java/net/onrc/onos/core/util/ImmutableClassChecker.java
+++ b/src/test/java/net/onrc/onos/core/util/ImmutableClassChecker.java
@@ -28,7 +28,7 @@
* @param clazz the class to check
* @return true if the given class is a properly specified immutable class.
*/
- private boolean isImmutableClass(Class clazz) {
+ private boolean isImmutableClass(Class<?> clazz) {
// class must be declared final
if (!Modifier.isFinal(clazz.getModifiers())) {
failureReason = "a class that is not final";
@@ -97,7 +97,7 @@
* @throws java.lang.AssertionError if the class is not a valid
* utility class
*/
- public static void assertThatClassIsImmutable(Class clazz) {
+ public static void assertThatClassIsImmutable(Class<?> clazz) {
final ImmutableClassChecker checker = new ImmutableClassChecker();
if (!checker.isImmutableClass(clazz)) {
final Description toDescription = new StringDescription();
diff --git a/src/test/java/net/onrc/onos/core/util/UtilityClassChecker.java b/src/test/java/net/onrc/onos/core/util/UtilityClassChecker.java
index d3fcc65..50d7060 100644
--- a/src/test/java/net/onrc/onos/core/util/UtilityClassChecker.java
+++ b/src/test/java/net/onrc/onos/core/util/UtilityClassChecker.java
@@ -33,7 +33,7 @@
* @param clazz the class to check
* @return true if the given class is a properly specified utility class.
*/
- private boolean isProperlyDefinedUtilityClass(Class clazz) {
+ private boolean isProperlyDefinedUtilityClass(Class<?> clazz) {
// class must be declared final
if (!Modifier.isFinal(clazz.getModifiers())) {
failureReason = "a class that is not final";
@@ -116,7 +116,7 @@
* @throws java.lang.AssertionError if the class is not a valid
* utility class
*/
- public static void assertThatClassIsUtility(Class clazz) {
+ public static void assertThatClassIsUtility(Class<?> clazz) {
final UtilityClassChecker checker = new UtilityClassChecker();
if (!checker.isProperlyDefinedUtilityClass(clazz)) {
final Description toDescription = new StringDescription();