< prev index next >

src/com/sun/interview/InterviewSet.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg

@@ -106,11 +106,11 @@
             throw new NullPointerException();
 
         if (dependency == null)
             throw new NullPointerException();
 
-        Set allDeps = getAllDependencies(dependency);
+        Set<Interview> allDeps = getAllDependencies(dependency);
         if (allDeps != null && allDeps.contains(child))
             throw new CycleFault(child, dependency);
 
         Set<Interview> deps = getDependencies(child, true);
         deps.add(dependency);

@@ -129,11 +129,11 @@
             throw new NullPointerException();
 
         if (dependency == null)
             throw new NullPointerException();
 
-        Set deps = getDependencies(child, false);
+        Set<Interview> deps = getDependencies(child, false);
 
         if (deps != null)
             deps.remove(dependency);
 
         if (deps.size() == 0)

@@ -151,11 +151,11 @@
         }
 
         return deps;
     }
 
-    private Set getAllDependencies(Interview child) {
+    private Set<Interview> getAllDependencies(Interview child) {
         Set<Interview> s = new HashSet<>();
         getAllDependencies(child, s);
         return s;
     }
 

@@ -244,12 +244,12 @@
                 throw new IllegalArgumentException();
 
             if (o1 == o2)
                 return 0;
 
-            for (Iterator iter = children.iterator(); iter.hasNext(); ) {
-                Object o = iter.next();
+            for (Iterator<Interview> iter = children.iterator(); iter.hasNext(); ) {
+                Interview o = iter.next();
                 if (o == o1)
                     return -1;
                 if (o == o2)
                     return 1;
             }
< prev index next >