SteamWar/BauSystem2.0
Archiviert
12
0

Removed null returns
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Dieser Commit ist enthalten in:
D4rkr34lm 2024-02-20 23:22:34 +01:00
Ursprung 5c96da9acd
Commit 3a3c4819f9

Datei anzeigen

@ -85,8 +85,11 @@ public class TraceManager implements Listener {
* @param id id of the trace * @param id id of the trace
* @return the trace with given id or null if no trace with id is found * @return the trace with given id or null if no trace with id is found
*/ */
public Trace get(int id){ public Optional<Trace> get(int id){
return traces.getOrDefault(id, null); Trace ret = traces.get(id);
if(traces.containsKey(id))
return Optional.of(traces.get(id));
return Optional.empty();
} }
/** Methode to get all traces /** Methode to get all traces