Skip to content

Commit

Permalink
remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainJuge committed Sep 19, 2024
1 parent 14c0c2d commit 1a6533e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.Properties;
import java.util.logging.Logger;
import javax.management.MBeanServerConnection;
Expand All @@ -36,7 +37,7 @@ public class JmxScraper {
*/
@SuppressWarnings({"SystemOut", "SystemExitOutsideMain"})
public static void main(String[] args) {
JmxScraperConfig config = null;
JmxScraperConfig config;
JmxScraper jmxScraper = null;
try {
JmxScraperConfigFactory factory = new JmxScraperConfigFactory();
Expand All @@ -54,9 +55,9 @@ public static void main(String[] args) {
}

try {
jmxScraper.start();
Objects.requireNonNull(jmxScraper).start();
} catch (IOException e) {
System.err.println("Unable to connect to " + config.getServiceUrl() + " " + e.getMessage());
System.err.println("Unable to connect " + e.getMessage());
System.exit(2);
}
}
Expand Down

0 comments on commit 1a6533e

Please sign in to comment.