Skip to content

Commit

Permalink
NPE protection
Browse files Browse the repository at this point in the history
  • Loading branch information
nkorange committed Dec 14, 2018
1 parent 71f1d94 commit 2bd2ed1
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ public class CmdbDumpTask implements Runnable {

@Override
public void run() {

try {
if (cmdbService == null) {
return;
}
// refresh entity map:
entityMap = cmdbService.getAllEntities();
} catch (Exception e) {
Expand All @@ -162,6 +166,11 @@ public class CmdbEventTask implements Runnable {
@Override
public void run() {
try {

if (cmdbService == null) {
return;
}

long current = System.currentTimeMillis();
List<EntityEvent> events = cmdbService.getEntityEvents(eventTimestamp);
eventTimestamp = current;
Expand Down

0 comments on commit 2bd2ed1

Please sign in to comment.