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 — Use switch Expressions for JDK13 and newer · Issue #4062 · mapstruct/mapstruct Closed Labels DescriptionUse caseSwitch Expressions added in JDK13 give a better way of writing switches. Generated CodeInstead of generating: switch ( b ) { case "A": a = ValueMapper.A.A; break; case "B": a = ValueMapper.A.B; break; default: throw new IllegalArgumentException( "Unexpected enum constant: " + b ); } the generated output could be ValueMapper.A a = switch (b) { case "A" -> A.A; case "B" -> A.B; default -> throw new IllegalArgumentException("Unexpected enum constant: " + b); }; For enums constants the default branch is not needed. Possible workaroundsNo response MapStruct Version1.6.3 Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — 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. |