Skip to content

Commit 1d31957

Browse files
committed
Suppress "unchecked or unsafe operations" warning in JSONConfiguration
On every build, xmlint warned about "unchecked or unsafe operations" in the JSONConfiguration class, but fixing that would be an API-breaking change to the OCPP library. Suppress the warnings, since they cannot be fixed for now.
1 parent 32903d4 commit 1d31957

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

OCPP-J/src/main/java/eu/chargetime/ocpp/JSONConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ public <T> JSONConfiguration setParameter(String name, T value) {
5858
return this;
5959
}
6060

61+
@SuppressWarnings("unchecked")
6162
public <T> T getParameter(String name) {
6263
//noinspection unchecked
6364
return (T) parameters.get(name);
6465
}
6566

67+
@SuppressWarnings("unchecked")
6668
public <T> T getParameter(String name, T defaultValue) {
6769
//noinspection unchecked
6870
T value = (T) parameters.get(name);

0 commit comments

Comments
 (0)