Refactor: use ifPresent() instead of isPresent()

Change-Id: I41d6cbf7ba209728ae7e3661e7188ab8eab093e4
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/phase/IntentProcessPhase.java b/core/net/src/main/java/org/onosproject/net/intent/impl/phase/IntentProcessPhase.java
index bce572c..bef28ac 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/phase/IntentProcessPhase.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/phase/IntentProcessPhase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Open Networking Laboratory
+ * Copyright 2015-2016 Open Networking Laboratory
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -59,15 +59,13 @@
     }
 
     static void transferErrorCount(IntentData data, Optional<IntentData> stored) {
-        if (stored.isPresent()) {
-            IntentData storedData = stored.get();
+        stored.ifPresent(storedData -> {
             if (Objects.equals(data.intent(), storedData.intent()) &&
                     Objects.equals(data.request(), storedData.request())) {
                 data.setErrorCount(storedData.errorCount());
             } else {
                 data.setErrorCount(0);
             }
-        }
+        });
     }
-
 }