CompilerMessageCategory (CmdlineRemoteProto.Message.BuilderMessage.CompileMessage.Kind kind, CompilerMessageCategory defaultCategory) { return switch (kind) { case ERROR, INTERNAL_BUILDER_ERROR -> CompilerMessageCategory.ERROR; case WARNING -> CompilerMessageCategory.WARNING; case INFO, JPS_INFO, OTHER -> CompilerMessageCategory.INFORMATION; default -> defaultCategory; }; }