Skip to content

Commit bf893a8

Browse files
committed
Fix not obvious NPE
1 parent 03e6dc3 commit bf893a8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,11 @@ public String invoke(File f, VirtualChannel channel) throws IOException, Interru
236236

237237
for (EventStreamItem item : response) {
238238
String text = item.getStream();
239-
listener.getLogger().append(text);
240-
if (text.startsWith("Successfully built ")) {
241-
imageId = StringUtils.substringBetween(text, "Successfully built ", "\n").trim();
239+
if (text != null) {
240+
listener.getLogger().append(text);
241+
if (text.startsWith("Successfully built ")) {
242+
imageId = StringUtils.substringBetween(text, "Successfully built ", "\n").trim();
243+
}
242244
}
243245
}
244246

0 commit comments

Comments
 (0)