summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/uic/barcode/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/uic/barcode/utils')
-rw-r--r--src/main/java/org/uic/barcode/utils/AlgorithmNameResolver.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/org/uic/barcode/utils/AlgorithmNameResolver.java b/src/main/java/org/uic/barcode/utils/AlgorithmNameResolver.java
index 16cd638..cac2bc7 100644
--- a/src/main/java/org/uic/barcode/utils/AlgorithmNameResolver.java
+++ b/src/main/java/org/uic/barcode/utils/AlgorithmNameResolver.java
@@ -8,7 +8,11 @@ import java.util.HashMap;
/**
* The Class AlgorithmNameResolver.
*/
-public class AlgorithmNameResolver {
+public final class AlgorithmNameResolver {
+
+ private AlgorithmNameResolver() {
+ // Utility class will not be instantiated.
+ }
/** The Constant TYPE_KEY_GENERATOR_ALG. */
@@ -22,7 +26,7 @@ public class AlgorithmNameResolver {
/**
- * Adds an entry for a mapping of algorithm type and oid to an algorithm name
+ * Adds an entry for a mapping of an algorithm type and oid to an algorithm name
*
* @param type the algorithm type
* @param oid the algorithm OID
@@ -123,7 +127,7 @@ public class AlgorithmNameResolver {
name = service.getAlgorithm();
}
- if (name != null && name.length() > 0) {
+ if (name != null && !name.isEmpty()) {
return name;
}
}
@@ -135,7 +139,7 @@ public class AlgorithmNameResolver {
if (service != null) {
name = service.getAlgorithm();
}
- if (name != null && name.length() > 0) {
+ if (name != null && !name.isEmpty()) {
return name;
}
}