Revert "Use Optional instead of null to remove FIXME comment"

This reverts commit 9639df7bcf1bda1ebb22fe7d2850708992ccc38b.
This is due to the regression described in ONOS-825.

Change-Id: I2909ed3e3461439596f99bf0cd94da3792a0ff64
diff --git a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleBatchEntry.java b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleBatchEntry.java
index b814a98..a82d60e 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleBatchEntry.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleBatchEntry.java
@@ -17,25 +17,23 @@
 
 import org.onosproject.net.flow.FlowRuleBatchEntry.FlowRuleOperation;
 
-import java.util.Optional;
-
 
 public class FlowRuleBatchEntry
         extends BatchOperationEntry<FlowRuleOperation, FlowRule> {
 
-    private final Optional<Long> id;
+    private final Long id; // FIXME: consider using Optional<Long>
 
     public FlowRuleBatchEntry(FlowRuleOperation operator, FlowRule target) {
         super(operator, target);
-        this.id = Optional.empty();
+        this.id = null;
     }
 
-    public FlowRuleBatchEntry(FlowRuleOperation operator, FlowRule target, long id) {
+    public FlowRuleBatchEntry(FlowRuleOperation operator, FlowRule target, Long id) {
         super(operator, target);
-        this.id = Optional.of(id);
+        this.id = id;
     }
 
-    public Optional<Long> id() {
+    public Long id() {
         return id;
     }
 
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/OpenFlowRuleProvider.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/OpenFlowRuleProvider.java
index 513dd0c..65c980d 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/OpenFlowRuleProvider.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/OpenFlowRuleProvider.java
@@ -385,7 +385,7 @@
 
         private final Set<FlowEntry> offendingFlowMods = Sets.newHashSet();
         // Failed batch operation id
-        private Optional<Long> failedId;
+        private Long failedId;
 
         private final CountDownLatch countDownLatch;
         private BatchState state;
@@ -509,7 +509,7 @@
         public CompletedBatchOperation get() throws InterruptedException, ExecutionException {
             countDownLatch.await();
             this.state = BatchState.FINISHED;
-            Set<Long> failedIds = (failedId.isPresent()) ?  Sets.newHashSet(failedId.get()) : Collections.emptySet();
+            Set<Long> failedIds = (failedId != null) ?  Sets.newHashSet(failedId) : Collections.emptySet();
             CompletedBatchOperation result =
                     new CompletedBatchOperation(ok.get(), offendingFlowMods, failedIds);
             //FIXME do cleanup here (moved by BOC)
@@ -523,7 +523,7 @@
                 TimeoutException {
             if (countDownLatch.await(timeout, unit)) {
                 this.state = BatchState.FINISHED;
-                Set<Long> failedIds = (failedId.isPresent()) ? Sets.newHashSet(failedId.get()) : Collections.emptySet();
+                Set<Long> failedIds = (failedId != null) ?  Sets.newHashSet(failedId) : Collections.emptySet();
                 CompletedBatchOperation result =
                         new CompletedBatchOperation(ok.get(), offendingFlowMods, failedIds);
                 // FIXME do cleanup here (moved by BOC)