Yuta HIGUCHI
Committed by Ray Milkey

Avoid NPE when IntentData was not found.

Change-Id: I3cb67c1ad487c8b546056a35ef0412e41d8e4fb1
......@@ -205,7 +205,9 @@ public class VirtualNetworkIntentService extends AbstractListenerManager<IntentE
@Override
public IntentState getIntentState(Key intentKey) {
checkNotNull(intentKey, KEY_NULL);
return store.getIntentData(intentKey).state();
return Optional.ofNullable(store.getIntentData(intentKey))
.map(IntentData::state)
.orElse(null);
}
@Override
......