From 963fbabf14c5b69c64360c952cc9acd7903ef2cb Mon Sep 17 00:00:00 2001 From: mkulesh Date: Mon, 20 Jul 2020 18:21:14 +0200 Subject: [PATCH] Fixed compiler warnings: synchronisation on a non-final field --- app/src/main/java/com/mkulesh/mmd/AtomPainter.java | 4 ++-- app/src/main/java/com/mkulesh/mmd/Experiment.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/mkulesh/mmd/AtomPainter.java b/app/src/main/java/com/mkulesh/mmd/AtomPainter.java index 35af3c7..8473309 100644 --- a/app/src/main/java/com/mkulesh/mmd/AtomPainter.java +++ b/app/src/main/java/com/mkulesh/mmd/AtomPainter.java @@ -80,14 +80,14 @@ enum BackgroudMode private ZoomPanel zoomPanel = null; private Context context = null; private SurfaceHolder holder = null; - private WallpaperOffsets wallpaperOffsets = new WallpaperOffsets(); + private final WallpaperOffsets wallpaperOffsets = new WallpaperOffsets(); // synchronization with calculation thread private BlockingQueue waitingQueue = null, immediateQueue = null; // thread implementation private Thread thread = null; - private ThreadContol threadControl = new ThreadContol(); + private final ThreadContol threadControl = new ThreadContol(); // timing statistic and fps control private static final float maxFps = 25.0f; diff --git a/app/src/main/java/com/mkulesh/mmd/Experiment.java b/app/src/main/java/com/mkulesh/mmd/Experiment.java index 2a95e0d..3ec7af1 100644 --- a/app/src/main/java/com/mkulesh/mmd/Experiment.java +++ b/app/src/main/java/com/mkulesh/mmd/Experiment.java @@ -97,7 +97,7 @@ public static class Options * Private attributes to be created internally */ private Context context = null; - private ThreadContol threadControl = new ThreadContol(); + private final ThreadContol threadControl = new ThreadContol(); private AtomPainter painter = null; private Thread thread = null;