From a1f842db1228b361cdc597cf8ae6158b7552cd17 Mon Sep 17 00:00:00 2001 From: jonmv Date: Mon, 2 May 2022 15:13:54 +0200 Subject: Handle null header value --- .../yahoo/vespa/hosted/controller/application/pkg/TestPackage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/TestPackage.java') diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/TestPackage.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/TestPackage.java index 751f6674128..0c9ff7863bd 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/TestPackage.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/TestPackage.java @@ -141,7 +141,9 @@ public class TestPackage { try { byte[] testsJar = ZipEntries.readFile(testPackage, "components/" + path, 1 << 30); Manifest manifest = new JarInputStream(new ByteArrayInputStream(testsJar)).getManifest(); - for (String suite : manifest.getMainAttributes().getValue("X-JDisc-Test-Bundle-Categories").split(",")) + String bundleCategoriesHeader = manifest.getMainAttributes().getValue("X-JDisc-Test-Bundle-Categories"); + if (bundleCategoriesHeader == null) continue; + for (String suite : bundleCategoriesHeader.split(",")) if ( ! suite.isBlank()) switch (suite.trim()) { case "SystemTest": suites.add(system); break; case "StagingSetup": suites.add(staging_setup); break; -- cgit v1.2.3