Skip to content

Commit

Permalink
Update to fix sonar reported bug
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbourelly999 committed Jan 11, 2024
1 parent a6501d1 commit 31acca3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,16 +380,17 @@ public synchronized void processTimeAdvanceGrant(long time) throws InternalFeder
for (DetectedObjectInteraction detectionInteraction: detectedObjectInteractions) {
this.rti.triggerInteraction(detectionInteraction);
}
} catch (IllegalValueException e) {
log.error("Error during advanceTime(" + time + ")", e);
}
catch (IllegalValueException e) {
log.error("Failed to process advance time grant due to : ", e);
}
catch (XmlRpcException e ) {
throw new InternalFederateException("Failed to process advance time grant due to CARLA CDA Sim "
+ "Adapter connection! Check carla_config.json!", e);
}
catch (InterruptedException e) {
throw new InternalFederateException("Failed to process advance time grant due to CARLA CDA Sim "
+ "Adapter connection! Check carla_config.json!", e);
log.error("Failed to process advance time grant due to failed thread sleep!", e);
Thread.currentThread().interrupt();
}
}

Expand Down Expand Up @@ -419,6 +420,7 @@ public void finishSimulation() throws InternalFederateException {
connectionProcess.waitFor(10, TimeUnit.SECONDS);
} catch (InterruptedException e) {
log.warn("Something went wrong when stopping a process", e);
Thread.currentThread().interrupt();
} finally {
connectionProcess.destroy();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ public void processDetectorRegistrationInteractionException() throws XmlRpcExcep
ambassador.processInteraction(registration);

verify(carlaXmlRpcClientMock, times(1)).createSensor(registration);


}


Expand Down

0 comments on commit 31acca3

Please sign in to comment.