Skip to content

Commit

Permalink
fix NPE in ApplyNestsStep.getNestsPath
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceWalkerRS committed Jun 16, 2024
1 parent 2075675 commit 694564c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ public StepResult run(PipelineCache pipelineCache, OrderedVersion mcVersion, Map
private Optional<Path> getNestsPath(OrderedVersion mcVersion, MappingFlavour mappingFlavour) throws Exception {
if (mcVersion.compareTo(GitCraftConfig.FIRST_MERGEABLE_VERSION) >= 0) {
OrnitheNestsVersionMeta nestsBuild = getLatestNestsBuild(mcVersion, Side.MERGED);
if (nestsBuild == null) {
return Optional.empty();
}
return Optional.of(prepareNests(nestsBuild, mcVersion, Side.MERGED, mappingFlavour));
} else {
OrnitheNestsVersionMeta clientNestsBuild = getLatestNestsBuild(mcVersion, Side.CLIENT);
Expand Down Expand Up @@ -130,6 +127,9 @@ public OrnitheNestsVersionMeta getLatestNestsBuild(OrderedVersion mcVersion, Sid
}

private Path prepareNests(OrnitheNestsVersionMeta nestsMeta, OrderedVersion mcVersion, Side side, MappingFlavour mappingFlavour) {
if (nestsMeta == null) {
return null;
}
Path nestsFile = getNestsPath(nestsMeta);
if (Files.exists(nestsFile)) {
return nestsFile;
Expand Down

0 comments on commit 694564c

Please sign in to comment.