-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Following exception happened when deleting an project:
java.lang.IllegalArgumentException: Illegal Capacity: -1
at java.base/java.util.ArrayList.<init>(ArrayList.java:158)
at de.doubleslash.keeptime.controller.Controller.adaptProjectIndexesAfterRemoving(Controller.java:304)
at de.doubleslash.keeptime.controller.Controller.deleteProject(Controller.java:194)
at de.doubleslash.keeptime.REST_API.controller.ProjectController.deleteProject(ProjectController.java:111)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
| final List<Project> changedProjects = new ArrayList<>(size - removedIndex); |
Logic seems wrong: List is initialized with a capacity based on the sorting Index - which does not make sense?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
