void (String start, ListIterator<String> iterator) { if (myIgnoreMode) { return; } if (!iterator.hasNext()) { mySyntaxException = new PatchSyntaxException(iterator.previousIndex(), VcsBundle.message("patch.empty.additional.info.header")); return; } while (true) { final String header = iterator.next(); final int idxHead = header.indexOf(UnifiedDiffWriter.ADD_INFO_HEADER); if (idxHead == -1) { if (myAddMap.isEmpty()) { mySyntaxException = new PatchSyntaxException(iterator.previousIndex(), VcsBundle.message("patch.empty.additional.info.header")); } iterator.previous(); return; } final String subsystem = header.substring(idxHead + UnifiedDiffWriter.ADD_INFO_HEADER.length()).trim(); if (!iterator.hasNext()) { mySyntaxException = new PatchSyntaxException(iterator.previousIndex(), VcsBundle.message("patch.empty.0.data.section", subsystem)); return; } final StringBuilder sb = new StringBuilder(); myAddMap.put(subsystem, sb); while (iterator.hasNext()) { final String line = iterator.next(); if (!line.startsWith(UnifiedDiffWriter.ADD_INFO_LINE_START)) { iterator.previous(); break; } if (sb.length() > 0) { sb.append("\n"); } sb.append(StringUtil.unescapeStringCharacters(line.substring(UnifiedDiffWriter.ADD_INFO_LINE_START.length()))); } } }