Skip to content

Commit

Permalink
Remove unneeded dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbenson committed Jan 2, 2019
1 parent 265fe1f commit 314bb0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@
<artifactId>commons-lang</artifactId>
<version>${commons-lang.version}</version>
</dependency>
<dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${apache-commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>com.datadoghq</groupId>
<artifactId>java-dogstatsd-client</artifactId>
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/datadog/jmxfetch/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.log4j.Appender;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.CharEncoding;
import org.apache.commons.io.IOUtils;
import org.datadog.jmxfetch.reporter.Reporter;
import org.datadog.jmxfetch.util.CustomLogger;
Expand Down Expand Up @@ -220,7 +219,7 @@ public boolean processAutoDiscovery(byte[] buffer) {
String[] discovered;

try {
String configs = new String(buffer, CharEncoding.UTF_8);
String configs = new String(buffer, "UTF-8");
String separator = App.AD_CONFIG_SEP;

if (configs.indexOf(App.AD_LEGACY_CONFIG_SEP) != -1) {
Expand All @@ -240,7 +239,7 @@ public boolean processAutoDiscovery(byte[] buffer) {
try{
String name = getAutoDiscoveryName(config);
LOGGER.debug("Attempting to apply config. Name: " + name + "\nconfig: \n" + config);
InputStream stream = new ByteArrayInputStream(config.getBytes(CharEncoding.UTF_8));
InputStream stream = new ByteArrayInputStream(config.getBytes("UTF-8"));
YamlParser yaml = new YamlParser(stream);

if (this.addConfig(name, yaml)){
Expand Down

0 comments on commit 314bb0a

Please sign in to comment.