Add test scenario
This commit is contained in:
@ -266,5 +266,25 @@
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>Iterating on this object NPE, refs #800</description>
|
||||
<expected-problems>0</expected-problems> <!-- FIXME should be 1 -->
|
||||
<code><![CDATA[
|
||||
import java.util.Iterator;
|
||||
|
||||
class Foo<T> implements Iterable<T> {
|
||||
|
||||
@Override
|
||||
public Iterator<T> iterator() {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void fofo() {
|
||||
for (Iterator<T> it = this.iterator(); it.hasNext();) {
|
||||
T item = it.next();
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
</test-data>
|
||||
|
Reference in New Issue
Block a user