Skip to content

Commit

Permalink
[SUREFIRE-2202] NullPointerException if super class meets specific co…
Browse files Browse the repository at this point in the history
…ndition

This closes #673
  • Loading branch information
javydreamercsw authored and michael-o committed Oct 15, 2023
1 parent 176937d commit 5a09438
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ private static boolean shouldRun(ITestNGMethod test) {
boolean hasTestResolver = resolver != null && !resolver.isEmpty();
if (hasTestResolver) {
boolean run = false;
for (Class<?> clazz = test.getRealClass(); !run && clazz != Object.class; clazz = clazz.getSuperclass()) {
for (Class<?> clazz = test.getRealClass();
!run && clazz != null && clazz != Object.class;
clazz = clazz.getSuperclass()) {
run = resolver.shouldRun(clazz, test.getMethodName());
}
return run;
Expand Down

0 comments on commit 5a09438

Please sign in to comment.