Use enhanced switch statement

Comment From: wilkinsona

Thanks for the proposal but the source in spring-boot/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade is copied from elsewhere and we prefer to keep it also close to the original as we can.