Skip to content

Commit

Permalink
Removing validateNotNull outdated check
Browse files Browse the repository at this point in the history
  • Loading branch information
manumafe98 committed Feb 2, 2024
1 parent 5f7c0b9 commit 68a6edb
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tests/hamming/src/main/java/Hamming.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit 68a6edb

Please sign in to comment.