Skip to content

Commit

Permalink
NPE when mBeanClientPollingFailure is thrown (#19)
Browse files Browse the repository at this point in the history
* fix - return an empty list instead of bug

* bump version

* bump version
  • Loading branch information
shalomgu authored Nov 13, 2017
1 parent f1627e3 commit dbd4037
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ docker push logzio/jmx2graphite
# Changelog
- v1.2.3
- Fixed an NPE when poll() resulted in MBeanClient.MBeanClientPollingFailure
- v1.2.1
- Fixed a bug when no protocol was provided
- Fixed log4j dependencies
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apply plugin: "com.github.johnrengelman.shadow"
mainClassName = 'io.logz.jmx2graphite.Jmx2GraphiteJolokia'

group = "io.logz"
version = "1.2.2"
version = "1.2.3"

repositories {
mavenCentral()
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/io/logz/jmx2graphite/MetricsPipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -53,7 +54,8 @@ private List<MetricValue> poll() {
} else {
logger.warn("Failed polling metrics from client ({}): {}", client.getClass().toString(), e.getMessage());
}
return null;

return Collections.emptyList();
}
}

Expand Down

0 comments on commit dbd4037

Please sign in to comment.