The current implementation assumes that Gson always returns a valid JsonArray instance. But in the case of an empty file, the result is null, which crashes the game with an NPE. This PR simply adds a null-check to return an empty result as if the file wasn't present.
The current implementation assumes that Gson always returns a valid JsonArray instance. But in the case of an empty file, the result is null, which crashes the game with an NPE. This PR simply adds a null-check to return an empty result as if the file wasn't present.