Skip to content

Commit 79c77fa

Browse files
author
simplilearn-devops
authored
Fixed NPE
1 parent 2dbda1f commit 79c77fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DevOps/src/devops/business/DockerData.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ public class DockerData {
88

99
public Docker processDockerData( Event event ) {
1010
String status = event.getStatus() != null ? event.getStatus().toUpperCase() : "NONE" ;
11+
String from = event.getFrom() != null ? event.getFrom() : "NONE" ;
1112
return new Docker( new Date( event.getTime() * 1000L )
12-
, "Container " + status + " from " + event.getFrom() + " id " + event.getId() ) ;
13+
, event.getType() + " " + status + " from " + from + " id " + event.getId() ) ;
1314
}
1415
}

0 commit comments

Comments
 (0)