upload
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m8s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m8s
This commit is contained in:
@@ -41,5 +41,19 @@ public class TaskManager {
|
||||
}
|
||||
<span class="fc" id="L42"> return this.taskMap.get(taskID);</span>
|
||||
}
|
||||
|
||||
public void deleteTask(String name) {
|
||||
<span class="fc bfc" id="L46" title="All 2 branches covered."> if (name == null ) {</span>
|
||||
|
||||
<span class="fc" id="L48"> throw new IllegalArgumentException("Name is null!");</span>
|
||||
}
|
||||
<span class="fc bfc" id="L50" title="All 4 branches covered."> if(name.isEmpty() || this.taskMap.values().stream().noneMatch(t -> t.getName().equals(name))) {</span>
|
||||
<span class="fc" id="L51"> throw new IllegalArgumentException("Wrong name!");</span>
|
||||
}
|
||||
|
||||
<span class="fc" id="L54"> this.taskMap.remove(this.taskMap.values().stream().filter(t -> t.getName().equals(name)).findFirst()</span>
|
||||
<span class="fc" id="L55"> .orElseThrow().getTaskID());</span>
|
||||
|
||||
<span class="fc" id="L57"> }</span>
|
||||
}
|
||||
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.13.202504020838</span></div></body></html>
|
||||
Reference in New Issue
Block a user