mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
New level 'MUST_NOT_MODIFY' is introduced for parameters inside pure methods to signal that we should not modify these values, but we don't actually know whether they mutable or not (fixes IDEA-257286). Also, MUST_NOT_MODIFY is dropped inside nested closures, so we don't warn if parameter is modified there. GitOrigin-RevId: f095e72be772eef8324ef2246fb0b7262beae20d
9 lines
202 B
Java
9 lines
202 B
Java
import java.util.List;
|
|
import org.jetbrains.annotations.*;
|
|
|
|
public class ModifyListInLambda {
|
|
@Contract(pure = true)
|
|
Runnable getRunnable(List<String> list) {
|
|
return () -> list.add("foo");
|
|
}
|
|
} |