Skip to content

Commit 032c64b

Browse files
committed
chore: Checkstyle nitpicks
1 parent 4290a96 commit 032c64b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/main/java/org/datadog/jmxfetch/App.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@
1616
import org.datadog.jmxfetch.util.LogLevel;
1717
import org.datadog.jmxfetch.util.ServiceCheckHelper;
1818

19-
import java.io.*;
19+
import java.io.BufferedInputStream;
20+
import java.io.ByteArrayInputStream;
21+
import java.io.File;
22+
import java.io.FileInputStream;
23+
import java.io.FileNotFoundException;
24+
import java.io.IOException;
25+
import java.io.InputStream;
2026
import java.lang.management.ManagementFactory;
2127
import java.nio.charset.Charset;
2228
import java.util.ArrayList;
@@ -759,7 +765,8 @@ private void loadFileConfigs(final AppConfig config, final Map<String, YamlParse
759765
final String name = file.getName().replace(".yaml", "");
760766
final String yamlPath = file.getAbsolutePath();
761767
log.info("Reading {}", yamlPath);
762-
try (BufferedInputStream yamlInputStream = new BufferedInputStream(new FileInputStream(yamlPath))) {
768+
try (BufferedInputStream yamlInputStream =
769+
new BufferedInputStream(new FileInputStream(yamlPath))) {
763770
configs.put(name, new YamlParser(yamlInputStream));
764771
} catch (FileNotFoundException e) {
765772
log.warn("Cannot find " + yamlPath);

src/main/java/org/datadog/jmxfetch/Instance.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ static void loadMetricConfigFiles(
327327
String yamlPath = new File(fileName).getAbsolutePath();
328328

329329
log.info("Reading metric config file " + yamlPath);
330-
try (BufferedInputStream yamlInputStream = new BufferedInputStream(new FileInputStream(yamlPath))){
330+
try (BufferedInputStream yamlInputStream =
331+
new BufferedInputStream(new FileInputStream(yamlPath))) {
331332
List<Map<String, Object>> confs =
332333
(List<Map<String, Object>>)
333334
YAML.get().loadFromInputStream(yamlInputStream);

0 commit comments

Comments
 (0)