Skip to content

Commit

Permalink
relax log list
Browse files Browse the repository at this point in the history
  • Loading branch information
schumifabi committed May 29, 2024
1 parent e4f0699 commit 5c22124
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,13 @@ public void handleEvent(UnpluggingEvent event) {
chargingProcess.setUnplugTime(event.getTime());
chargingProcess.setPluggedDuration(chargingProcess.getUnplugTime()-chargingProcess.getStartTime());
chargingProcess.setChargingRatio(chargingProcess.getChargingDuration()/chargingProcess.getPluggedDuration());

if(chargingProcess.complete()&&chargingProcess.valid()){
logList.add(chargingProcess);
} else
throw new RuntimeException("Failed to add invalid or incomplete ChargingLogEntry to logList!");

logList.add(chargingProcess);

//if(chargingProcess.complete()&&chargingProcess.valid()){
// logList.add(chargingProcess);
//} else
// throw new RuntimeException("Failed to add invalid or incomplete ChargingLogEntry to logList!");
} else
throw new RuntimeException(event.getVehicleId().toString() + " has no ongoing charging process at charger " + event.getChargerId().toString());

Expand Down

0 comments on commit 5c22124

Please sign in to comment.