Skip to content

Commit

Permalink
Added null check for null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbourelly999 committed Aug 8, 2023
1 parent d3276a9 commit 99038aa
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@ public synchronized void processTimeAdvanceGrant(long time) throws InternalFeder
onRsuRegistrationRequest(reg.getInfrastructureId(), reg.getLocation().toGeo());
log.info("RSU Registration for "+ reg.getInfrastructureId() + " @ x, y, z: (" + reg.getLocation().getX() + ", " + reg.getLocation().getY() + ", " + reg.getLocation().getZ() + ")");
onDsrcRegistrationRequest(reg.getInfrastructureId());
log.debug("Sending SensorRegistration interactions for sensor : {}", reg.getSensors());
// Check for empty list of sensors which is valid
if (reg.getSensors() != null ) {
log.debug("Sending SensorRegistration interactions for sensor : {}", reg.getSensors());
}
for (Detector sensor : reg.getSensors()) {
// Trigger Sensor registrations for all listed sensors.
this.rti.triggerInteraction(new DetectorRegistration(time,sensor));
Expand Down

0 comments on commit 99038aa

Please sign in to comment.