From what was understood on code, updateTaskMap is supposed to be updating the task map. However, it was called in add(task) to insert to task map. The code fails to add a new entry to the HashMap.
From the Java API Docs:
Open DeclarationTask java.util.HashMap.replace(String key, Task value)
Replaces the entry for the specified key only if it is currently mapped to some value.
Specified by: replace(...) in Map
Parameters:
key key with which the specified value is associated
value value to be associated with the specified key
Returns:
the previous value associated with the specified key, or null if there was no mapping for the key. (A null return can also indicate that the map previously associated null with the key, if the implementation supports null values.)
From what was understood on code, updateTaskMap is supposed to be updating the task map. However, it was called in add(task) to insert to task map. The code fails to add a new entry to the HashMap.
From the Java API Docs:
It will not add to the taskmap.