diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolAdapter.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolAdapter.java index 7c9346334a..5062915c27 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolAdapter.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolAdapter.java @@ -23,8 +23,8 @@ import java.util.List; class MeasurementToolAdapter extends ArrayAdapter { - private MapActivity mapActivity; - private List points; + private final MapActivity mapActivity; + private final List points; private RemovePointListener listener; MeasurementToolAdapter(@NonNull Context context, @LayoutRes int resource, List points) { diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java index d699016cf4..722b59b5b2 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java @@ -28,18 +28,18 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL private OsmandMapTileView view; private boolean inMeasurementMode; - private LinkedList measurementPoints = new LinkedList<>(); + private final LinkedList measurementPoints = new LinkedList<>(); private LinkedList cacheMeasurementPoints = new LinkedList<>(); private Bitmap centerIconDay; private Bitmap centerIconNight; private Bitmap pointIcon; private Paint bitmapPaint; - private RenderingLineAttributes lineAttrs = new RenderingLineAttributes("measureDistanceLine"); - private Path path = new Path(); + private final RenderingLineAttributes lineAttrs = new RenderingLineAttributes("measureDistanceLine"); + private final Path path = new Path(); private int marginX; private int marginY; - private TIntArrayList tx = new TIntArrayList(); - private TIntArrayList ty = new TIntArrayList(); + private final TIntArrayList tx = new TIntArrayList(); + private final TIntArrayList ty = new TIntArrayList(); @Override public void initLayer(OsmandMapTileView view) {