summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/uic/barcode/utils
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2024-11-15 14:48:14 +0100
committerGitHub <noreply@github.com>2024-11-15 14:48:14 +0100
commit15c13a22610ad6e705b38e66ce3599b1ebe78df7 (patch)
treec4e9449567b776145b5c971224f9233d3e7cc42f /src/main/java/org/uic/barcode/utils
parentMerge pull request #89 from UnionInternationalCheminsdeFer/fix_SSB_class_codes (diff)
parentMerge branch 'master' into feature/upgrade-pom-version-to-match-tag-1.4.8 (diff)
downloadUIC-barcode-15c13a22610ad6e705b38e66ce3599b1ebe78df7.tar
UIC-barcode-15c13a22610ad6e705b38e66ce3599b1ebe78df7.tar.gz
UIC-barcode-15c13a22610ad6e705b38e66ce3599b1ebe78df7.tar.bz2
UIC-barcode-15c13a22610ad6e705b38e66ce3599b1ebe78df7.tar.lz
UIC-barcode-15c13a22610ad6e705b38e66ce3599b1ebe78df7.tar.xz
UIC-barcode-15c13a22610ad6e705b38e66ce3599b1ebe78df7.tar.zst
UIC-barcode-15c13a22610ad6e705b38e66ce3599b1ebe78df7.zip
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;
}
}