diff --git a/src/main/java/eu/over9000/skadi/model/StateContainer.java b/src/main/java/eu/over9000/skadi/model/StateContainer.java index ae03769..2f4c5e6 100644 --- a/src/main/java/eu/over9000/skadi/model/StateContainer.java +++ b/src/main/java/eu/over9000/skadi/model/StateContainer.java @@ -147,7 +147,7 @@ public double getWindowWidth() { return windowWidth; } - public void setWindowWidth(double windowWidth) { + public void setWindowWidth(final double windowWidth) { this.windowWidth = windowWidth; } @@ -155,7 +155,7 @@ public double getWindowHeight() { return windowHeight; } - public void setWindowHeight(double windowHeight) { + public void setWindowHeight(final double windowHeight) { this.windowHeight = windowHeight; } } diff --git a/src/main/java/eu/over9000/skadi/service/ImageRetrievalService.java b/src/main/java/eu/over9000/skadi/service/ImageRetrievalService.java index 1b79d8f..f305f8c 100644 --- a/src/main/java/eu/over9000/skadi/service/ImageRetrievalService.java +++ b/src/main/java/eu/over9000/skadi/service/ImageRetrievalService.java @@ -57,7 +57,7 @@ protected Task createTask() { @Override protected ImageView call() throws Exception { - Image img = ImageUtil.getImageInternal(url); + final Image img = ImageUtil.getImageInternal(url); final ImageView iv = new ImageView(img); diff --git a/src/main/java/eu/over9000/skadi/service/LivestreamerVersionCheckService.java b/src/main/java/eu/over9000/skadi/service/LivestreamerVersionCheckService.java index 6cdc0a6..b2c9e3c 100644 --- a/src/main/java/eu/over9000/skadi/service/LivestreamerVersionCheckService.java +++ b/src/main/java/eu/over9000/skadi/service/LivestreamerVersionCheckService.java @@ -48,7 +48,7 @@ public class LivestreamerVersionCheckService extends Service { public LivestreamerVersionCheckService(final StatusBar sb) { setOnSucceeded(event -> { - String message = (String) event.getSource().getValue(); + final String message = (String) event.getSource().getValue(); if (message != null) { sb.setText(message); diff --git a/src/main/java/eu/over9000/skadi/service/PanelConstructionService.java b/src/main/java/eu/over9000/skadi/service/PanelConstructionService.java index abc2e9e..d1077f5 100644 --- a/src/main/java/eu/over9000/skadi/service/PanelConstructionService.java +++ b/src/main/java/eu/over9000/skadi/service/PanelConstructionService.java @@ -12,7 +12,7 @@ public class PanelConstructionService extends Service { private Panel panel; - public PanelConstructionService(Panel panel) { + public PanelConstructionService(final Panel panel) { this.panel = panel; } diff --git a/src/main/java/eu/over9000/skadi/service/VersionCheckerService.java b/src/main/java/eu/over9000/skadi/service/VersionCheckerService.java index 5381f1b..b758fa7 100644 --- a/src/main/java/eu/over9000/skadi/service/VersionCheckerService.java +++ b/src/main/java/eu/over9000/skadi/service/VersionCheckerService.java @@ -83,14 +83,14 @@ public VersionCheckerService(final Stage window, final StatusBar sb) { LOGGER.info(msg_older); sb.setText(msg_older); - UpdateAvailableDialog dialog = new UpdateAvailableDialog(result.getRemoteResult()); + final UpdateAvailableDialog dialog = new UpdateAvailableDialog(result.getRemoteResult()); dialog.initModality(Modality.APPLICATION_MODAL); dialog.initOwner(window); final Optional doDownload = dialog.showAndWait(); if (doDownload.get() == UpdateAvailableDialog.UPDATE_BUTTON_TYPE) { window.hide(); - PerformUpdateDialog doDialog = new PerformUpdateDialog(result.getRemoteResult()); + final PerformUpdateDialog doDialog = new PerformUpdateDialog(result.getRemoteResult()); doDialog.initModality(Modality.APPLICATION_MODAL); doDialog.initOwner(window); final Optional newJar = doDialog.showAndWait(); @@ -101,7 +101,7 @@ public VersionCheckerService(final Stage window, final StatusBar sb) { try { LOGGER.info("starting new jar.."); Runtime.getRuntime().exec("java -jar " + newJar.get().getAbsolutePath()); - } catch (IOException e) { + } catch (final IOException e) { LOGGER.error("error starting updated version", e); } LOGGER.info("begin shutdown"); diff --git a/src/main/java/eu/over9000/skadi/ui/MainWindow.java b/src/main/java/eu/over9000/skadi/ui/MainWindow.java index 4b74cb7..9914709 100644 --- a/src/main/java/eu/over9000/skadi/ui/MainWindow.java +++ b/src/main/java/eu/over9000/skadi/ui/MainWindow.java @@ -478,8 +478,8 @@ private void checkThemeChange() { private void updateFilterPredicate() { final Predicate channelPredicate = channel -> { - boolean isOnlineResult; - boolean containsTextResult; + final boolean isOnlineResult; + final boolean containsTextResult; // isOnline returns a Boolean, can be null isOnlineResult = !onlineOnly.isSelected() || Boolean.TRUE.equals(channel.isOnline()); diff --git a/src/main/java/eu/over9000/skadi/util/EmoteUtil.java b/src/main/java/eu/over9000/skadi/util/EmoteUtil.java index 4f9dd43..31ef301 100644 --- a/src/main/java/eu/over9000/skadi/util/EmoteUtil.java +++ b/src/main/java/eu/over9000/skadi/util/EmoteUtil.java @@ -63,7 +63,7 @@ public static List buildEmotePanel(final List try { latch.await(); - } catch (InterruptedException e) { + } catch (final InterruptedException e) { LOGGER.error("error in emote list retrieval: ", e); } diff --git a/src/main/java/eu/over9000/skadi/util/HttpUtil.java b/src/main/java/eu/over9000/skadi/util/HttpUtil.java index cf3bf91..0b398c3 100644 --- a/src/main/java/eu/over9000/skadi/util/HttpUtil.java +++ b/src/main/java/eu/over9000/skadi/util/HttpUtil.java @@ -52,12 +52,12 @@ public static String getAPIResponse(final String apiUrl) throws URISyntaxExcepti return new BasicResponseHandler().handleResponse(response); } - public static InputStream getAPIResponseBin(String apiURL) throws IOException, URISyntaxException { + public static InputStream getAPIResponseBin(final String apiURL) throws IOException, URISyntaxException { final URI URL = new URI(apiURL); final HttpGet request = new HttpGet(URL); request.setHeader("Client-ID", SKADI_CLIENT_ID); final HttpResponse response = HTTP_CLIENT.execute(request); - HttpEntity entity = response.getEntity(); + final HttpEntity entity = response.getEntity(); return entity.getContent(); } diff --git a/src/main/java/eu/over9000/skadi/util/ImageUtil.java b/src/main/java/eu/over9000/skadi/util/ImageUtil.java index afdc1c6..ebd474a 100644 --- a/src/main/java/eu/over9000/skadi/util/ImageUtil.java +++ b/src/main/java/eu/over9000/skadi/util/ImageUtil.java @@ -47,8 +47,8 @@ public class ImageUtil { public static Image getImageInternal(final String url) { try { - InputStream stream = HttpUtil.getAPIResponseBin(url); - Image img = new Image(stream); + final InputStream stream = HttpUtil.getAPIResponseBin(url); + final Image img = new Image(stream); stream.close(); return img; } catch (URISyntaxException | IOException e) { diff --git a/src/main/java/eu/over9000/skadi/util/PanelUtil.java b/src/main/java/eu/over9000/skadi/util/PanelUtil.java index 045c9d5..e0daaac 100644 --- a/src/main/java/eu/over9000/skadi/util/PanelUtil.java +++ b/src/main/java/eu/over9000/skadi/util/PanelUtil.java @@ -71,12 +71,12 @@ public class PanelUtil { private static final Logger LOGGER = LoggerFactory.getLogger(PanelUtil.class); public static List buildPanels(final List panels) { - List result = new ArrayList<>(panels.size()); + final List result = new ArrayList<>(panels.size()); - CountDownLatch latch = new CountDownLatch(panels.size()); + final CountDownLatch latch = new CountDownLatch(panels.size()); panels.forEach(panel -> { - PanelConstructionService service = new PanelConstructionService(panel); + final PanelConstructionService service = new PanelConstructionService(panel); service.setOnSucceeded(event -> { final VBox panelBox = (VBox) event.getSource().getValue(); result.add(panelBox); @@ -90,7 +90,7 @@ public static List buildPanels(final List panels) { try { latch.await(); - } catch (InterruptedException e) { + } catch (final InterruptedException e) { LOGGER.error("error waiting for panel construction: ", e); } diff --git a/src/main/java/eu/over9000/skadi/util/helper/AsyncImageUpdateTask.java b/src/main/java/eu/over9000/skadi/util/helper/AsyncImageUpdateTask.java index 005b619..36b5979 100644 --- a/src/main/java/eu/over9000/skadi/util/helper/AsyncImageUpdateTask.java +++ b/src/main/java/eu/over9000/skadi/util/helper/AsyncImageUpdateTask.java @@ -31,7 +31,7 @@ public class AsyncImageUpdateTask implements Callable { private final Channel channel; - private String url; + private final String url; public AsyncImageUpdateTask(final Channel channel, final String url) { this.channel = channel;