Skip to content

Commit

Permalink
Fix null pointer exception in test class SyntaxParserTest (#138)
Browse files Browse the repository at this point in the history
* Fix null pointer exception in test class SyntaxParserTest

* Fix null pointer exception in test class SyntaxParserTest

* Update src/test/java/io/github/syst3ms/skriptparser/parsing/SyntaxParserTest.java

Co-authored-by: Mwexim <[email protected]>

---------

Co-authored-by: Mwexim <[email protected]>
  • Loading branch information
TheLimeGlass and Mwexim authored Oct 31, 2023
1 parent 3fe704d commit c3f88ac
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ private static File[] getResourceFolderFiles(String folder) {
URL url = ClassLoader.getSystemResource(folder);
if (url != null) {
var path = url.getPath();
return new File(path).listFiles();
var files = new File(path).listFiles();
if (files != null)
return files;
}
return new File[0];
}
Expand Down

0 comments on commit c3f88ac

Please sign in to comment.