Skip to content

Commit

Permalink
improve exception handling during calls
Browse files Browse the repository at this point in the history
* bugfix: ChargePointServiceJsonInvoker should call failed(..) instead of defaultCallback().failed(..)
because failed(..) iterates over all registered callbacks, whereas defaultCallback only the default one.
this was letting other callbacks hang.

* ChargePointServiceSoapInvoker should not throw Exception if one mismatched "station X operation"
combination is not fitting. instead, we create the dedicated failure msg and trigger the callbacks for this
combination and continue with other stations.
  • Loading branch information
goekay committed Jan 8, 2025
1 parent 67d9be3 commit fb3caa8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/main/java/de/rwth/idsg/steve/ocpp/CommunicationTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void addNewError(String chargeBoxId, String errorMessage) {
}
}

protected void success(String chargeBoxId, RESPONSE response) {
public void success(String chargeBoxId, RESPONSE response) {
for (OcppCallback<RESPONSE> c : callbackList) {
try {
c.success(chargeBoxId, response);
Expand All @@ -135,7 +135,7 @@ protected void success(String chargeBoxId, RESPONSE response) {
}
}

protected void failed(String chargeBoxId, Exception exception) {
public void failed(String chargeBoxId, Exception exception) {
for (OcppCallback<RESPONSE> c : callbackList) {
try {
c.failed(chargeBoxId, exception);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
@Service
public class ChargePointServiceSoapInvoker implements ChargePointServiceInvoker {

public static final Exception EXCEPTION_V12 = new IllegalArgumentException("This operation is not supported by this OCPP 1.2 station");

Check failure on line 53 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L53 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 139).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:53:0: error: Line is longer than 120 characters (found 139). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
public static final Exception EXCEPTION_V15 = new IllegalArgumentException("This operation is not supported by this OCPP 1.5 station");

Check failure on line 54 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L54 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 139).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:54:0: error: Line is longer than 120 characters (found 139). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)

private final ClientProviderWithCache<ocpp.cp._2010._08.ChargePointService> soapV12Helper;
private final ClientProviderWithCache<ocpp.cp._2012._06.ChargePointService> soapV15Helper;
private final ClientProviderWithCache<ocpp.cp._2015._10.ChargePointService> soapV16Helper;
Expand Down Expand Up @@ -150,7 +153,7 @@ public void remoteStopTransaction(ChargePointSelect cp, RemoteStopTransactionTas
@Override
public void dataTransfer(ChargePointSelect cp, DataTransferTask task) {
switch (cp.getOcppProtocol().getVersion()) {

Check failure on line 155 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L155 <com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck>

switch without "default" clause.
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:155:9: error: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case V_12 -> throw new IllegalArgumentException("Not supported");
case V_12 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V12);
case V_15 -> createV15(cp).dataTransferAsync(task.getOcpp15Request(), cp.getChargeBoxId(), task.getOcpp15Handler(cp.getChargeBoxId()));

Check failure on line 157 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L157 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 147).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:157:0: error: Line is longer than 120 characters (found 147). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
case V_16 -> createV16(cp).dataTransferAsync(task.getOcpp16Request(), cp.getChargeBoxId(), task.getOcpp16Handler(cp.getChargeBoxId()));

Check failure on line 158 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L158 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 147).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:158:0: error: Line is longer than 120 characters (found 147). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
}
Expand All @@ -159,7 +162,7 @@ public void dataTransfer(ChargePointSelect cp, DataTransferTask task) {
@Override
public void getConfiguration(ChargePointSelect cp, GetConfigurationTask task) {
switch (cp.getOcppProtocol().getVersion()) {

Check failure on line 164 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L164 <com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck>

switch without "default" clause.
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:164:9: error: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case V_12 -> throw new IllegalArgumentException("Not supported");
case V_12 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V12);
case V_15 -> createV15(cp).getConfigurationAsync(task.getOcpp15Request(), cp.getChargeBoxId(), task.getOcpp15Handler(cp.getChargeBoxId()));

Check failure on line 166 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L166 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 151).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:166:0: error: Line is longer than 120 characters (found 151). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
case V_16 -> createV16(cp).getConfigurationAsync(task.getOcpp16Request(), cp.getChargeBoxId(), task.getOcpp16Handler(cp.getChargeBoxId()));

Check failure on line 167 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L167 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 151).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:167:0: error: Line is longer than 120 characters (found 151). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
}
Expand All @@ -168,7 +171,7 @@ public void getConfiguration(ChargePointSelect cp, GetConfigurationTask task) {
@Override
public void getLocalListVersion(ChargePointSelect cp, GetLocalListVersionTask task) {
switch (cp.getOcppProtocol().getVersion()) {

Check failure on line 173 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L173 <com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck>

switch without "default" clause.
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:173:9: error: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case V_12 -> throw new IllegalArgumentException("Not supported");
case V_12 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V12);
case V_15 -> createV15(cp).getLocalListVersionAsync(task.getOcpp15Request(), cp.getChargeBoxId(), task.getOcpp15Handler(cp.getChargeBoxId()));

Check failure on line 175 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L175 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 154).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:175:0: error: Line is longer than 120 characters (found 154). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
case V_16 -> createV16(cp).getLocalListVersionAsync(task.getOcpp16Request(), cp.getChargeBoxId(), task.getOcpp16Handler(cp.getChargeBoxId()));

Check failure on line 176 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L176 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 154).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:176:0: error: Line is longer than 120 characters (found 154). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
}
Expand All @@ -177,7 +180,7 @@ public void getLocalListVersion(ChargePointSelect cp, GetLocalListVersionTask ta
@Override
public void sendLocalList(ChargePointSelect cp, SendLocalListTask task) {
switch (cp.getOcppProtocol().getVersion()) {

Check failure on line 182 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L182 <com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck>

switch without "default" clause.
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:182:9: error: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case V_12 -> throw new IllegalArgumentException("Not supported");
case V_12 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V12);
case V_15 -> createV15(cp).sendLocalListAsync(task.getOcpp15Request(), cp.getChargeBoxId(), task.getOcpp15Handler(cp.getChargeBoxId()));

Check failure on line 184 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L184 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 148).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:184:0: error: Line is longer than 120 characters (found 148). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
case V_16 -> createV16(cp).sendLocalListAsync(task.getOcpp16Request(), cp.getChargeBoxId(), task.getOcpp16Handler(cp.getChargeBoxId()));

Check failure on line 185 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L185 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 148).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:185:0: error: Line is longer than 120 characters (found 148). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
}
Expand All @@ -186,7 +189,7 @@ public void sendLocalList(ChargePointSelect cp, SendLocalListTask task) {
@Override
public void reserveNow(ChargePointSelect cp, ReserveNowTask task) {
switch (cp.getOcppProtocol().getVersion()) {

Check failure on line 191 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L191 <com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck>

switch without "default" clause.
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:191:9: error: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case V_12 -> throw new IllegalArgumentException("Not supported");
case V_12 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V12);
case V_15 -> createV15(cp).reserveNowAsync(task.getOcpp15Request(), cp.getChargeBoxId(), task.getOcpp15Handler(cp.getChargeBoxId()));

Check failure on line 193 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L193 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 145).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:193:0: error: Line is longer than 120 characters (found 145). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
case V_16 -> createV16(cp).reserveNowAsync(task.getOcpp16Request(), cp.getChargeBoxId(), task.getOcpp16Handler(cp.getChargeBoxId()));

Check failure on line 194 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L194 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 145).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:194:0: error: Line is longer than 120 characters (found 145). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
}
Expand All @@ -195,7 +198,7 @@ public void reserveNow(ChargePointSelect cp, ReserveNowTask task) {
@Override
public void cancelReservation(ChargePointSelect cp, CancelReservationTask task) {
switch (cp.getOcppProtocol().getVersion()) {

Check failure on line 200 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L200 <com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck>

switch without "default" clause.
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:200:9: error: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case V_12 -> throw new IllegalArgumentException("Not supported");
case V_12 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V12);
case V_15 -> createV15(cp).cancelReservationAsync(task.getOcpp15Request(), cp.getChargeBoxId(), task.getOcpp15Handler(cp.getChargeBoxId()));

Check failure on line 202 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L202 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 152).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:202:0: error: Line is longer than 120 characters (found 152). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
case V_16 -> createV16(cp).cancelReservationAsync(task.getOcpp16Request(), cp.getChargeBoxId(), task.getOcpp16Handler(cp.getChargeBoxId()));

Check failure on line 203 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L203 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 152).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:203:0: error: Line is longer than 120 characters (found 152). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
}
Expand All @@ -208,31 +211,35 @@ public void cancelReservation(ChargePointSelect cp, CancelReservationTask task)
@Override
public void clearChargingProfile(ChargePointSelect cp, ClearChargingProfileTask task) {
switch (cp.getOcppProtocol().getVersion()) {

Check failure on line 213 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L213 <com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck>

switch without "default" clause.
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:213:9: error: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case V_12, V_15 -> throw new IllegalArgumentException("Not supported");
case V_12 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V12);
case V_15 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V15);
case V_16 -> createV16(cp).clearChargingProfileAsync(task.getOcpp16Request(), cp.getChargeBoxId(), task.getOcpp16Handler(cp.getChargeBoxId()));

Check failure on line 216 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L216 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 155).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:216:0: error: Line is longer than 120 characters (found 155). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
}
}

@Override
public void setChargingProfile(ChargePointSelect cp, SetChargingProfileTask task) {
switch (cp.getOcppProtocol().getVersion()) {

Check failure on line 222 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L222 <com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck>

switch without "default" clause.
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:222:9: error: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case V_12, V_15 -> throw new IllegalArgumentException("Not supported");
case V_12 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V12);
case V_15 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V15);
case V_16 -> createV16(cp).setChargingProfileAsync(task.getOcpp16Request(), cp.getChargeBoxId(), task.getOcpp16Handler(cp.getChargeBoxId()));

Check failure on line 225 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L225 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 153).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:225:0: error: Line is longer than 120 characters (found 153). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
}
}

@Override
public void getCompositeSchedule(ChargePointSelect cp, GetCompositeScheduleTask task) {
switch (cp.getOcppProtocol().getVersion()) {

Check failure on line 231 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L231 <com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck>

switch without "default" clause.
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:231:9: error: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case V_12, V_15 -> throw new IllegalArgumentException("Not supported");
case V_12 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V12);
case V_15 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V15);
case V_16 -> createV16(cp).getCompositeScheduleAsync(task.getOcpp16Request(), cp.getChargeBoxId(), task.getOcpp16Handler(cp.getChargeBoxId()));

Check failure on line 234 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L234 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 155).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:234:0: error: Line is longer than 120 characters (found 155). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
}
}

@Override
public void triggerMessage(ChargePointSelect cp, TriggerMessageTask task) {
switch (cp.getOcppProtocol().getVersion()) {

Check failure on line 240 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L240 <com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck>

switch without "default" clause.
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:240:9: error: switch without "default" clause. (com.puppycrawl.tools.checkstyle.checks.coding.MissingSwitchDefaultCheck)
case V_12, V_15 -> throw new IllegalArgumentException("Not supported");
case V_12 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V12);
case V_15 -> task.failed(cp.getChargeBoxId(), EXCEPTION_V15);
case V_16 -> createV16(cp).triggerMessageAsync(task.getOcpp16Request(), cp.getChargeBoxId(), task.getOcpp16Handler(cp.getChargeBoxId()));

Check failure on line 243 in src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java#L243 <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck>

Line is longer than 120 characters (found 149).
Raw output
/github/workspace/./src/main/java/de/rwth/idsg/steve/ocpp/soap/ChargePointServiceSoapInvoker.java:243:0: error: Line is longer than 120 characters (found 149). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void runPipeline(ChargePointSelect cps, CommunicationTask task) {
} catch (Exception e) {
log.error("Exception occurred", e);
// Outgoing call failed due to technical problems. Pass the exception to handler to inform the user
task.defaultCallback().failed(cps.getChargeBoxId(), e);
task.failed(cps.getChargeBoxId(), e);
}
}

Expand Down

0 comments on commit fb3caa8

Please sign in to comment.