GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — UnnecessaryDefaultInEnumSwitch provides illegal suggestion for arrow rules in switch statements · Issue #5045 · google/error-prone Closed DescriptionIn the following example, the check UnnecessaryDefaultInEnumSwitch suggests to remove the public class Test { enum TestEnum { FOO, BAR; } void unnecessaryDefault() { String x; switch (TestEnum.FOO) { case FOO -> x = "FOO"; case BAR -> x = "BAR"; default -> throw new AssertionError(); } System.out.println(x); } } It seems the reason is the incomplete handling of arrow rules from e5d52dd in error-prone/core/src/main/java/com/google/errorprone/bugpatterns/UnnecessaryDefaultInEnumSwitch.java Lines 159 to 163 in cecce2e
Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |