void (@NotNull MessageHolder holder) { this.finished = true; try { index = Integer.parseInt(indexSegment.toString()); if (index < 0) { holder.addError(MessageFormatErrorType.INDEX_NEGATIVE, indexSegmentStart, indexSegmentStart + indexSegment.length()); } } catch (NumberFormatException e) { holder.addError(MessageFormatErrorType.UNPARSED_INDEX, indexSegmentStart, indexSegmentStart + indexSegment.length()); } if (!formatTypeSegment.isEmpty()) { String typeSegment = formatTypeSegment.toString(); for (MessageFormatType value : MessageFormatType.values()) { if (value.name().equals(typeSegment.trim().toUpperCase(Locale.ROOT))) { formatType = value; } } if (formatType == null) { if (formatStyleSegmentStart >= formatTypeSegmentStart) { holder.addError(MessageFormatErrorType.UNKNOWN_FORMAT_TYPE, formatTypeSegmentStart, formatStyleSegmentStart - 1); } else { holder.addError(MessageFormatErrorType.UNKNOWN_FORMAT_TYPE, formatTypeSegmentStart, holder.current); } } } tryParseStyle(holder); }