11 lines
299 B
11 lines
299 B
5 years ago
|
This issue type indicates impure functions. For instance, below functions would be marked as impure:
|
||
|
```java
|
||
|
void makeAllZero_impure(ArrayList<Foo> list) {
|
||
|
Iterator<Foo> listIterator = list.iterator();
|
||
|
while (listIterator.hasNext()) {
|
||
|
Foo foo = listIterator.next();
|
||
|
foo.x = 0;
|
||
|
}
|
||
|
}
|
||
|
```
|