|
for (DependencyInfo dependency : version.getMetadata().getDependencies()) { |
|
if (involvedModules.add(dependency.getId())) { |
|
moduleQueue.push(dependency.getId()); |
|
moduleVersionPool.put(dependency.getId(), PossibleVersion.OPTIONAL_VERSION); |
|
} |
|
} |
Apparently ModuleMetadata.getDependencies can return a list with a null element when module.txt contains an extra trailing comma, as in the example below.
Could catch the null here, but probably better to fix it so that list can't contain null elements at all, even if the JSON is invalid.
[example module.txt]
module.txt:
{
"id": "BlockDetector",
"version": "1.4.0-SNAPSHOT",
"author": "rzats",
"displayName": "BlockDetector",
"description": "Adds a detector item that indicates the location of arbitrary blocks.",
"dependencies": [
{
"id": "CoreAssets",
"minVersion": "2.0.0"
},
{
"id": "Inventory",
"minVersion": "1.1.0"
},
],
"serverSideOnly": false,
"isAsset": true,
"isLibrary": true
}
gestalt/gestalt-module/src/main/java/org/terasology/gestalt/module/dependencyresolution/ResolutionAttempt.java
Lines 86 to 91 in d97b8f7
Apparently
ModuleMetadata.getDependenciescan return a list with anullelement when module.txt contains an extra trailing comma, as in the example below.Could catch the null here, but probably better to fix it so that list can't contain null elements at all, even if the JSON is invalid.
[example module.txt]
module.txt:
{ "id": "BlockDetector", "version": "1.4.0-SNAPSHOT", "author": "rzats", "displayName": "BlockDetector", "description": "Adds a detector item that indicates the location of arbitrary blocks.", "dependencies": [ { "id": "CoreAssets", "minVersion": "2.0.0" }, { "id": "Inventory", "minVersion": "1.1.0" }, ], "serverSideOnly": false, "isAsset": true, "isLibrary": true }