diff --git a/src/main/java/application/rest/StackUtils.java b/src/main/java/application/rest/StackUtils.java index b41baf2..f17d304 100644 --- a/src/main/java/application/rest/StackUtils.java +++ b/src/main/java/application/rest/StackUtils.java @@ -442,9 +442,16 @@ public static String digestCheck(String kabDigest, String imageDigest, String st System.out.println("Could not find one of the digests. Kab digest="+kabDigest+", imageDigest="+imageDigest); digestCheck="unknown"; } - - status=status.substring(0, 6); - if (!"active".contentEquals(status)) { + if (status!=null) { + if (status.contains("active")) { + status=status.substring(0, 6); + if (!"active".contentEquals(status)) { + digestCheck = "NA"; + } + } else { + digestCheck = "NA"; + } + } else { digestCheck = "NA"; } return digestCheck;