Skip to content

Commit

Permalink
Null safe check
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoKrupitza committed Aug 7, 2021
1 parent bf81c8f commit 8983a81
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import org.json.JSONObject;
import org.json.JSONTokener;

import java.util.Objects;

/**
* @author Diego Krupitza
* @version 1.0
Expand All @@ -29,7 +31,7 @@ private static void validateExternalBoModules(BoProject boProject) {
protected static void validateJson(String rawJson) throws BoProjectValidationException {
try {
JSONObject jsonSchema = new JSONObject(
new JSONTokener(ClassLoader.getSystemResourceAsStream(BoProjectSchema)));
new JSONTokener(Objects.requireNonNull(ClassLoader.getSystemResourceAsStream(BoProjectSchema))));

JSONObject jsonSubject = new JSONObject(new JSONTokener(rawJson));

Expand Down

0 comments on commit 8983a81

Please sign in to comment.