From 68a6edbd053237cefaaff1ff1e08f5a336e0bcc2 Mon Sep 17 00:00:00 2001 From: manumafe98 Date: Fri, 2 Feb 2024 17:30:16 -0300 Subject: [PATCH] Removing validateNotNull outdated check --- tests/hamming/src/main/java/Hamming.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/hamming/src/main/java/Hamming.java b/tests/hamming/src/main/java/Hamming.java index cce71fbe..7890e831 100644 --- a/tests/hamming/src/main/java/Hamming.java +++ b/tests/hamming/src/main/java/Hamming.java @@ -12,16 +12,9 @@ class Hamming { private void validate(String leftStrand, String rightStrand) { - validateNotNull(leftStrand, rightStrand); validateSameLength(leftStrand, rightStrand); } - private void validateNotNull(String leftStrand, String rightStrand) { - if (leftStrand == null || rightStrand == null) { - throw new IllegalArgumentException("Either left or right stand is null"); - } - } - private void validateSameLength(String leftStrand, String rightStrand) { if (leftStrand.length() != rightStrand.length()) { throw new IllegalArgumentException("leftStrand and rightStrand must be of equal length.");