Skip to content

Commit

Permalink
INSPECTIT-2323: inspectIT UI throws exception during alert creating w…
Browse files Browse the repository at this point in the history
…hen using InfluxDB v1.2.0
  • Loading branch information
mariusoe authored and Ivan Senic committed Mar 21, 2017
1 parent 438fb11 commit 50fdd27
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
10 changes: 6 additions & 4 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,18 @@ dependencies {
'com.mchange:c3p0:0.9.5.1',
'com.mchange:mchange-commons-java:0.2.10',

'org.influxdb:influxdb-java:2.4-PATCHED',
'org.influxdb:influxdb-java:2.5',
'com.google.code.gson:gson:2.3.1',
'com.squareup.retrofit2:converter-jackson:2.1.0',
'com.fasterxml.jackson.core:jackson-annotations:2.7.0',
'com.fasterxml.jackson.core:jackson-core:2.7.2',
'com.fasterxml.jackson.core:jackson-databind:2.7.2',
'com.squareup.retrofit2:retrofit:2.1.0',
'com.squareup.okhttp3:okhttp:3.4.1',
'com.squareup.okhttp3:logging-interceptor:3.4.1',
'com.squareup.okio:okio:1.9.0',
'com.squareup.okhttp3:okhttp:3.5.0',
'com.squareup.okhttp3:logging-interceptor:3.5.0',
'com.squareup.retrofit2:converter-moshi:2.1.0',
'com.squareup.moshi:moshi:1.2.0',
'com.squareup.okio:okio:1.8.0',

'org.apache.commons:commons-email:1.4',
'javax.activation:activation:1.1.1',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package rocks.inspectit.server.influx.util;

import org.apache.commons.lang.StringUtils;
import org.influxdb.InfluxDB;
import org.influxdb.InfluxDBFactory;
import org.springframework.beans.factory.annotation.Value;
Expand Down Expand Up @@ -46,8 +47,11 @@ public class InfluxClientFactory {
* is thrown if the client could not be created
*/
public InfluxDB createClient() throws IllegalArgumentException {
if (host == null) {
throw new IllegalArgumentException("Host may not be null.");
if (StringUtils.isEmpty(host)) {
throw new IllegalArgumentException("Host may not be null or empty.");
}
if (port <= 0) {
throw new IllegalArgumentException("Specify a valid port in the range between 1 and 65535.");
}
String influxUrl = "http://" + host + ":" + port;
return InfluxDBFactory.connect(influxUrl, user, password);
Expand Down
4 changes: 3 additions & 1 deletion license/THIRDPARTYLICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# commons-lang
# commons-pool
# converter-jackson
# converter-moshi
# gson
# guava
# httpclient
Expand All @@ -27,6 +28,7 @@
# jcl-over-slf4j
# kryo-serializers
# logging-interceptor
# moshi
# objensis
# okhttp
# okio
Expand Down Expand Up @@ -67,7 +69,7 @@ Copyright (c) 2003-2013, Objenesis Team and all contributors. (objensis)

Copyright (c) 2008 Google Inc. (gson)

Coptright (c) (converter-jackson, gson, jackson-core, logging-interceptor, okhttp, okio, retrofit)
Coptright (c) (converter-jackson, gson, jackson-core, logging-interceptor, okhttp, okio, retrofit, converter-moshi, moshi)

Note that copyright holder of a work retains his full rights without any
explicit notice.
Expand Down

0 comments on commit 50fdd27

Please sign in to comment.