Skip to content

Commit

Permalink
Require non null for loadedClass
Browse files Browse the repository at this point in the history
  • Loading branch information
gayaldassanayake committed Jan 29, 2024
1 parent ae89580 commit ecdf19e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Enumeration;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;

/**
* Custom class loader used to load the tool implementation classes.
Expand Down Expand Up @@ -60,7 +61,7 @@ protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundE
}
}
if (resolve) {
resolveClass(loadedClass);
resolveClass(Objects.requireNonNull(loadedClass));

Check warning on line 64 in cli/ballerina-cli/src/main/java/io/ballerina/cli/launcher/CustomToolClassLoader.java

View check run for this annotation

Codecov / codecov/patch

cli/ballerina-cli/src/main/java/io/ballerina/cli/launcher/CustomToolClassLoader.java#L64

Added line #L64 was not covered by tests
}
return loadedClass;

Check warning on line 66 in cli/ballerina-cli/src/main/java/io/ballerina/cli/launcher/CustomToolClassLoader.java

View check run for this annotation

Codecov / codecov/patch

cli/ballerina-cli/src/main/java/io/ballerina/cli/launcher/CustomToolClassLoader.java#L66

Added line #L66 was not covered by tests
}
Expand Down

0 comments on commit ecdf19e

Please sign in to comment.