Skip to content

Commit

Permalink
Fix null pointer issue in argument validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Rachiele committed Nov 2, 2017
1 parent a3ebbe9 commit d390acf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public static double multiply(Vector x, Matrix A) {
}

private static void validateArguments(Vector x, Matrix A) {
Validate.argumentsNotNull(x.getClass(), x);
Validate.argumentsNotNull(A.getClass(), A);
Validate.argumentsNotNull(Vector.class, x);
Validate.argumentsNotNull(Matrix.class, A);
if (!A.isSquare()) {
throw new IllegalArgumentException("The matrix must be square.");
}
Expand Down

0 comments on commit d390acf

Please sign in to comment.