Skip to content

Commit e5bfdec

Browse files
Merge pull request #1294 from HL7/jct-fix-npe
Fix NPE in PublicationChecker when publication-request.json is absent
2 parents 1088fbc + 5c91683 commit e5bfdec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/PublicationChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ private void checkPackage(List<String> messages, NpmPackage npm) {
222222

223223
private void checkExistingPublication(List<String> messages, NpmPackage npm, PackageList pl, JsonObject pr) {
224224
if (pl != null) {
225-
if (pr.has("movedFrom")) {
225+
if (pr != null && pr.has("movedFrom")) {
226226
check(messages, !npm.name().equals(pl.pid()), "Package ID matches, which is wrong. This package is " + npm.name() + " and the website is also " + pl.pid()+", but it must change" + mkError());
227227
check(messages, !npm.canonical().equals(pl.canonical()), "Package canonical matches, which is wrong. This package canonical is " + npm.canonical() + " and the website has " + pl.canonical()+", but it must change" + mkError());
228228
check(messages, !hasVersion(pl, npm.version()), "Version " + npm.version() + " has already been published" + mkWarning());

0 commit comments

Comments
 (0)