From a2f4bf1c6e2b5eea946d65acb208f7e7848f6015 Mon Sep 17 00:00:00 2001 From: Karsten Date: Tue, 22 Oct 2024 13:20:42 +0200 Subject: Minor code Liniting --- .../java/org/uic/barcode/utils/AlgorithmNameResolver.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/main/java/org/uic/barcode/utils') 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; } } -- cgit v1.2.3