Commit 77769bee6af350f912b8d03300fe7d9f163c6526

Authored by Volodymyr Babak
1 parent b58c8313

JDK 11 updates

... ... @@ -22,8 +22,8 @@ import com.google.common.util.concurrent.Futures;
22 22 import com.google.common.util.concurrent.ListenableFuture;
23 23 import com.google.common.util.concurrent.SettableFuture;
24 24 import lombok.extern.slf4j.Slf4j;
25   -import org.apache.commons.lang.RandomStringUtils;
26   -import org.apache.commons.lang.StringUtils;
  25 +import org.apache.commons.lang3.RandomStringUtils;
  26 +import org.apache.commons.lang3.StringUtils;
27 27 import org.checkerframework.checker.nullness.qual.Nullable;
28 28 import org.springframework.stereotype.Component;
29 29 import org.thingsboard.rule.engine.api.RpcError;
... ...
... ... @@ -26,7 +26,7 @@ import com.google.protobuf.AbstractMessage;
26 26 import com.google.protobuf.InvalidProtocolBufferException;
27 27 import com.google.protobuf.MessageLite;
28 28 import lombok.extern.slf4j.Slf4j;
29   -import org.apache.commons.lang.RandomStringUtils;
  29 +import org.apache.commons.lang3.RandomStringUtils;
30 30 import org.junit.After;
31 31 import org.junit.Assert;
32 32 import org.junit.Before;
... ... @@ -1216,12 +1216,12 @@ abstract public class BaseEdgeTest extends AbstractControllerTest {
1216 1216
1217 1217 // Wait before device attributes saved to database before requesting them from controller
1218 1218 Thread.sleep(1000);
1219   - Map<String, List<Map<String, String>>> timeseries = doGetAsync("/api/plugins/telemetry/DEVICE/" + device.getUuidId() + "/values/timeseries?keys=" + timeseriesKey, Map.class);
  1219 + Map<String, List<Map<String, String>>> timeseries = doGetAsyncTyped("/api/plugins/telemetry/DEVICE/" + device.getUuidId() + "/values/timeseries?keys=" + timeseriesKey, new TypeReference<>() {});
1220 1220 Assert.assertTrue(timeseries.containsKey(timeseriesKey));
1221 1221 Assert.assertEquals(1, timeseries.get(timeseriesKey).size());
1222 1222 Assert.assertEquals(timeseriesValue, timeseries.get(timeseriesKey).get(0).get("value"));
1223 1223
1224   - List<Map<String, String>> attributes = doGetAsync("/api/plugins/telemetry/DEVICE/" + device.getId() + "/values/attributes/" + DataConstants.SERVER_SCOPE, List.class);
  1224 + List<Map<String, String>> attributes = doGetAsyncTyped("/api/plugins/telemetry/DEVICE/" + device.getId() + "/values/attributes/" + DataConstants.SERVER_SCOPE, new TypeReference<>() {});
1225 1225 Assert.assertEquals(1, attributes.size());
1226 1226 Assert.assertEquals(attributes.get(0).get("key"), attributesKey);
1227 1227 Assert.assertEquals(attributes.get(0).get("value"), attributesValue);
... ...