Skip to content

Commit

Permalink
WELD-1753 Oops
Browse files Browse the repository at this point in the history
  • Loading branch information
jharting committed Nov 4, 2014
1 parent 5fa366f commit 1b7e972
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Expand Up @@ -173,9 +173,8 @@ BuilderImpl<T> addAll(BuilderImpl<T> items) {
}

@Override
@SuppressWarnings("unchecked")
public List<T> build() {
return (ImmutableList<T>) of(list.toArray());
return ImmutableList.ofInternal(list.toArray());
}
}

Expand Down
Expand Up @@ -55,7 +55,7 @@ E getElement(int index) {

@Override
public int indexOf(Object o) {
if (o != null && o.equals(o)) {
if (o != null && o.equals(element)) {
return 0;
}
return -1;
Expand Down
Expand Up @@ -94,6 +94,8 @@ public void testIndexOf() {
Assert.assertEquals(i, list.indexOf(getData()[i]));
Assert.assertEquals(i, list.lastIndexOf(getData()[i]));
}
Assert.assertEquals(-1, list.indexOf("qux"));
Assert.assertEquals(-1, list.lastIndexOf("qux"));
}

@Test
Expand Down

0 comments on commit 1b7e972

Please sign in to comment.