You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure if the default case can actually occur, because if the enum is set incorrectly, then a IllegalArgumentException is thrown by the Enum class before.
This is a common problem pattern. The best way to solve this in an enum is to avoid the switch at all:
simply make the method abstract and create a method implementation for each enum constant.
This way, if new enum constants are added, the compiler will force the developer to implement the abstract method and he cannot forget it due to the compiler error.
I will create a small cleanup story for this improvement but we can already merge this PR as planned.
This should be cleaned up with this story.
The text was updated successfully, but these errors were encountered:
From PR #724 see the review comment discussion:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/context/GitUrlSyntax.java
Line 71 in 55db46d
This should be cleaned up with this story.
The text was updated successfully, but these errors were encountered: