Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIComponentBaseTestCase - use raw types on iterators #5131

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -306,17 +306,17 @@ public void testComponentRemoval() {
testComponent.getChildren().add(child3);

// make sure children are stored in naming container properly
Iterator kidItr = null;
Iterator<UIComponent> kidItr = null;

kidItr = testComponent.getFacetsAndChildren();

child = (UIComponent) kidItr.next();
child = kidItr.next();
assertTrue(child.equals(child1));

child = (UIComponent) kidItr.next();
child = kidItr.next();
assertTrue(child.equals(child2));

child = (UIComponent) kidItr.next();
child = kidItr.next();
assertTrue(child.equals(child3));

// make sure child is removed from component and naming container
Expand All @@ -325,10 +325,10 @@ public void testComponentRemoval() {

kidItr = testComponent.getFacetsAndChildren();

child = (UIComponent) kidItr.next();
child = kidItr.next();
assertTrue(child.equals(child2));

child = (UIComponent) kidItr.next();
child = kidItr.next();
assertTrue(child.equals(child3));

// make sure child is removed from component and naming container
Expand All @@ -337,7 +337,7 @@ public void testComponentRemoval() {

kidItr = testComponent.getFacetsAndChildren();

child = (UIComponent) kidItr.next();
child = kidItr.next();
assertTrue(child.equals(child3));

// make sure child is removed from component and naming container
Expand Down Expand Up @@ -749,19 +749,19 @@ protected void lifecycleTrace(String lmethod, String cmethod, UIComponent compon
}

// Append the calls for each facet
Iterator names = component.getFacets().keySet().iterator();
Iterator<String> names = component.getFacets().keySet().iterator();
while (names.hasNext()) {
String name = (String) names.next();
String name = names.next();
sb.append("/").append(lmethod).append("-").append(name);
if (cmethod != null && component.getFacets().get(name).isRendered()) {
sb.append("/").append(cmethod).append("-").append(name);
}
}

// Append the calls for each child
Iterator kids = component.getChildren().iterator();
Iterator<UIComponent> kids = component.getChildren().iterator();
while (kids.hasNext()) {
UIComponent kid = (UIComponent) kids.next();
UIComponent kid = kids.next();
lifecycleTrace(lmethod, cmethod, kid, sb);
}

Expand Down Expand Up @@ -789,7 +789,7 @@ public void testGetFacetsAndChildren() {
testComponent.getFacets().put("facet2", facet2);
testComponent.getFacets().put("facet3", facet3);

Iterator iter = testComponent.getFacetsAndChildren();
Iterator<UIComponent> iter = testComponent.getFacetsAndChildren();
Object cur = null;
boolean exceptionThrown = false;
assertTrue(iter.hasNext());
Expand Down