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.
From PR #724 see the review comment discussion: https://github.com/devonfw/IDEasy/blob/55db46d0e936fd7e81aaa353b786bc8b825a04e8/cli/src/main/java/com/devonfw/tools/ide/context/GitUrlSyntax.java#L71
This should be cleaned up with this story.