Remove redundant type cast

Change-Id: I9bd51cc78bcb8fb4b475aac1e10dd54f901241e7
diff --git a/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java b/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java
index a31e986..9b9f7ce 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java
@@ -92,7 +92,7 @@
             // For the fake, we compile using a single level pass
             List<Intent> installable = new ArrayList<>();
             for (Intent compiled : getCompiler(intent).compile(intent, null, null)) {
-                installable.add((Intent) compiled);
+                installable.add(compiled);
             }
             executeInstallingPhase(intent, installable);
 
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java b/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java
index 02d9146..5710ace 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java
@@ -199,7 +199,7 @@
             if (resource instanceof Link) {
                 intentsByLink.remove(linkKey((Link) resource), intentKey);
             } else if (resource instanceof ElementId) {
-                intentsByDevice.remove((ElementId) resource, intentKey);
+                intentsByDevice.remove(resource, intentKey);
             }
         }
     }