ExpressionUtils#isSimpleExpression: disable for non-final fields

This commit is contained in:
Tagir Valeev
2018-02-05 15:53:39 +07:00
parent f49e9abdc6
commit d5f9284f2e
7 changed files with 21 additions and 16 deletions
@@ -5,7 +5,7 @@ import java.util.List;
import java.util.Objects;
public class Main {
private Point field = new Point(0, 0);
private final Point field = new Point(0, 0);
public Point find(List<Point> points) {
return points.stream().filter(Objects::nonNull).findFirst().orElse(field);
@@ -5,7 +5,7 @@ import java.util.List;
import java.util.Objects;
public class Main {
private static Point ZERO = new Point(0, 0);
private static final Point ZERO = new Point(0, 0);
public static Point find(List<Point> points) {
return points.stream().filter(Objects::nonNull).findFirst().orElse(ZERO);
@@ -4,7 +4,7 @@ import java.awt.*;
import java.util.List;
public class Main {
private Point field = new Point(0, 0);
private final Point field = new Point(0, 0);
public Point find(List<Point> points) {
for (Point pt : poin<caret>ts) {
@@ -4,7 +4,7 @@ import java.awt.*;
import java.util.List;
public class Main {
private static Point ZERO = new Point(0, 0);
private static final Point ZERO = new Point(0, 0);
public static Point find(List<Point> points) {
for (Point pt : point<caret>s) {