--- plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java~ 2010-02-19 12:12:49.000000000 +0000 +++ plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java 2010-08-09 23:16:39.201246659 +0000 @@ -25,7 +25,7 @@ private final Iterator iteratorIterator; private Iterator currentIterator; - private T nextObject = noElement(); + private Object nextObject = NO_ELEMENT; /** * Creates a compound iterator that will iterated over the elements @@ -47,8 +47,9 @@ if (!positionNext()) throw new NoSuchElementException(); - T nxt = nextObject; - nextObject = noElement(); + @SuppressWarnings("unchecked") + T nxt = (T) nextObject; + nextObject = NO_ELEMENT; return nxt; } @@ -76,9 +77,4 @@ nextObject = currentIterator.next(); return true; } - - @SuppressWarnings("unchecked") - private static T noElement() { - return (T) NO_ELEMENT; - } -} \ No newline at end of file +} --- plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java~ 2010-02-19 12:12:48.000000000 +0000 +++ plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java 2010-08-09 23:20:33.572246380 +0000 @@ -21,7 +21,7 @@ private final Iterator innerIterator; - private T nextObject = noElement(); + private Object nextObject = NO_ELEMENT; public MatchIteratorFilter(Iterator iterator) { this.innerIterator = iterator; @@ -35,8 +35,9 @@ if (!positionNext()) throw new NoSuchElementException(); - T nxt = nextObject; - nextObject = noElement(); + @SuppressWarnings("unchecked") + T nxt = (T) nextObject; + nextObject = NO_ELEMENT; return nxt; } @@ -63,9 +64,4 @@ } return false; } - - @SuppressWarnings("unchecked") - private static T noElement() { - return (T) NO_ELEMENT; - } -} \ No newline at end of file +}