Skip to content

Commit 52a5493

Browse files
committed
Suppress deprecated and unchecked warnings in ocpp-v1_6-test
The test classes in ocpp-v1_6-test rely heavily on using deprecated constructors and unchecked type casts, so suppress the warnings.
1 parent 10835a9 commit 52a5493

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

ocpp-v1_6-test/src/main/java/eu/chargetime/ocpp/test/DummyHandlers.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ of this software and associated documentation files (the "Software"), to deal
4848
import java.util.UUID;
4949
import java.util.function.BiConsumer;
5050

51+
@SuppressWarnings("deprecation")
5152
public class DummyHandlers {
5253

5354
private boolean riggedToFail;
@@ -279,6 +280,7 @@ public boolean wasLatestRequest(Type requestType) {
279280
&& requestType.equals(receivedRequest.getClass());
280281
}
281282

283+
@SuppressWarnings("unchecked")
282284
public <T extends Request> T getReceivedRequest(Class<T> clazz) {
283285
return wasLatestRequest(clazz) ? (T) receivedRequest : null;
284286
}
@@ -289,6 +291,7 @@ public boolean wasLatestConfirmation(Type confirmationType) {
289291
&& confirmationType.equals(receivedConfirmation.getClass());
290292
}
291293

294+
@SuppressWarnings("unchecked")
292295
public <T extends Confirmation> T getReceivedConfirmation(Class<T> clazz) {
293296
return wasLatestConfirmation(clazz) ? (T) receivedConfirmation : null;
294297
}

ocpp-v1_6-test/src/main/java/eu/chargetime/ocpp/test/FakeCentralSystem.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ of this software and associated documentation files (the "Software"), to deal
5252
import org.slf4j.Logger;
5353
import org.slf4j.LoggerFactory;
5454

55+
@SuppressWarnings("deprecation")
5556
public class FakeCentralSystem {
5657
private static final Logger logger = LoggerFactory.getLogger(FakeCentralSystem.class);
5758

ocpp-v1_6-test/src/main/java/eu/chargetime/ocpp/test/FakeChargePoint.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ of this software and associated documentation files (the "Software"), to deal
4949
import java.net.URL;
5050
import java.time.ZonedDateTime;
5151

52+
@SuppressWarnings("deprecation")
5253
public class FakeChargePoint {
5354
final ClientCoreProfile core;
5455
final ClientSmartChargingProfile smartCharging;

0 commit comments

Comments
 (0)