Trace Refactor #233
@ -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
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren