< 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,116 ****
throw new NullPointerException();
if (dependency == null)
throw new NullPointerException();
! Set allDeps = getAllDependencies(dependency);
if (allDeps != null && allDeps.contains(child))
throw new CycleFault(child, dependency);
Set<Interview> deps = getDependencies(child, true);
deps.add(dependency);
--- 106,116 ----
throw new NullPointerException();
if (dependency == null)
throw new NullPointerException();
! 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,139 ****
throw new NullPointerException();
if (dependency == null)
throw new NullPointerException();
! Set deps = getDependencies(child, false);
if (deps != null)
deps.remove(dependency);
if (deps.size() == 0)
--- 129,139 ----
throw new NullPointerException();
if (dependency == null)
throw new NullPointerException();
! Set<Interview> deps = getDependencies(child, false);
if (deps != null)
deps.remove(dependency);
if (deps.size() == 0)
*** 151,161 ****
}
return deps;
}
! private Set getAllDependencies(Interview child) {
Set<Interview> s = new HashSet<>();
getAllDependencies(child, s);
return s;
}
--- 151,161 ----
}
return deps;
}
! private Set<Interview> getAllDependencies(Interview child) {
Set<Interview> s = new HashSet<>();
getAllDependencies(child, s);
return s;
}
*** 244,255 ****
throw new IllegalArgumentException();
if (o1 == o2)
return 0;
! for (Iterator iter = children.iterator(); iter.hasNext(); ) {
! Object o = iter.next();
if (o == o1)
return -1;
if (o == o2)
return 1;
}
--- 244,255 ----
throw new IllegalArgumentException();
if (o1 == o2)
return 0;
! 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 >