From df941eea489514725f7f0e58b56ee0bf58c63660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= <63239207+Klagarge@users.noreply.github.com> Date: Thu, 25 May 2023 21:22:59 +0200 Subject: [PATCH] small polish --- src/main/java/ch/hevs/isi/core/DataPoint.java | 3 +-- src/main/java/ch/hevs/isi/db/DatabaseConnector.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/ch/hevs/isi/core/DataPoint.java b/src/main/java/ch/hevs/isi/core/DataPoint.java index cfc5543..4259189 100644 --- a/src/main/java/ch/hevs/isi/core/DataPoint.java +++ b/src/main/java/ch/hevs/isi/core/DataPoint.java @@ -26,8 +26,7 @@ public abstract class DataPoint{ if( !dataPointMap.containsKey(label) ){ return null; } else { - DataPoint dp = dataPointMap.get(label); - return dp; + return dataPointMap.get(label); } } diff --git a/src/main/java/ch/hevs/isi/db/DatabaseConnector.java b/src/main/java/ch/hevs/isi/db/DatabaseConnector.java index 0b17712..163d6d2 100644 --- a/src/main/java/ch/hevs/isi/db/DatabaseConnector.java +++ b/src/main/java/ch/hevs/isi/db/DatabaseConnector.java @@ -19,7 +19,7 @@ import java.util.Properties; public class DatabaseConnector implements DataPointListener { - private Properties properties = new Properties(); // Properties of the config.properties file + private final Properties properties = new Properties(); // Properties of the config.properties file private String fullURL = null; // Full URL of the InfluxDB server private URL urlForWrite = null; // URL of the InfluxDB server private HttpURLConnection con = null; // Connection to the InfluxDB server