Skip to content

Solve issues in method `addNewAgentToScenario`

https://gitlab.lrz.de/vadere/vadere/blob/master/VadereSimulator/src/org/vadere/simulator/control/SourceController.java#L179

  • Copied from method: TODO [priority=high] [task=refactoring] this is bad programming. Why is the target list added later? What if Pedestrian does something with the target list before it is stored?

  • Copied from method: TODO [priority=high] [task=refactoring] why only if he has no targets? because the createElement method might add some.

  • Method returns newElement but it is actually never used, so void should do as well.

  • [ ] IntelliJ suggests to turn the method private (before check if plausible)

  • IntelliJ suggests to turn the method package-private (before check if plausible)

Edited by Ghost User
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information