@Test public void testParseNullDocumentation() { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> { parser.parse(null); }); assertThat(e.getMessage()).isEqualTo("Documentation list cannot be null."); }
public List<T> parse(final List<String> documentation) { if (documentation == null) { throw new IllegalArgumentException("Documentation list cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(List)"); try { final List<T> parsed = new LinkedList<T>(); for (int i = 0, size = documentation.size(); i < size; i++) { final String currentLine = documentation.get(i); if (isParseable(currentLine)) { final DocumentationTagIndexedSmoosher indexedSmoosher = new DocumentationTagIndexedSmoosher(); parsed.add(parseElement(indexedSmoosher.smoosh(i, documentation))); final int endingIndex = indexedSmoosher.getEndingIndex(); if (endingIndex > i) { i = endingIndex - 1; } } } return parsed; } finally { point.collect(); } }
AbstractMultiTagParser { public List<T> parse(final List<String> documentation) { if (documentation == null) { throw new IllegalArgumentException("Documentation list cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(List)"); try { final List<T> parsed = new LinkedList<T>(); for (int i = 0, size = documentation.size(); i < size; i++) { final String currentLine = documentation.get(i); if (isParseable(currentLine)) { final DocumentationTagIndexedSmoosher indexedSmoosher = new DocumentationTagIndexedSmoosher(); parsed.add(parseElement(indexedSmoosher.smoosh(i, documentation))); final int endingIndex = indexedSmoosher.getEndingIndex(); if (endingIndex > i) { i = endingIndex - 1; } } } return parsed; } finally { point.collect(); } } }
AbstractMultiTagParser { public List<T> parse(final List<String> documentation) { if (documentation == null) { throw new IllegalArgumentException("Documentation list cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(List)"); try { final List<T> parsed = new LinkedList<T>(); for (int i = 0, size = documentation.size(); i < size; i++) { final String currentLine = documentation.get(i); if (isParseable(currentLine)) { final DocumentationTagIndexedSmoosher indexedSmoosher = new DocumentationTagIndexedSmoosher(); parsed.add(parseElement(indexedSmoosher.smoosh(i, documentation))); final int endingIndex = indexedSmoosher.getEndingIndex(); if (endingIndex > i) { i = endingIndex - 1; } } } return parsed; } finally { point.collect(); } }  }
AbstractMultiTagParser { public List<T> parse(final List<String> documentation) { if (documentation == null) { throw new IllegalArgumentException("Documentation list cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(List)"); try { final List<T> parsed = new LinkedList<T>(); for (int i = 0, size = documentation.size(); i < size; i++) { final String currentLine = documentation.get(i); if (isParseable(currentLine)) { final DocumentationTagIndexedSmoosher indexedSmoosher = new DocumentationTagIndexedSmoosher(); parsed.add(parseElement(indexedSmoosher.smoosh(i, documentation))); final int endingIndex = indexedSmoosher.getEndingIndex(); if (endingIndex > i) { i = endingIndex - 1; } } } return parsed; } finally { point.collect(); } }  List<T> parse(final List<String> documentation); }
AbstractMultiTagParser { public List<T> parse(final List<String> documentation) { if (documentation == null) { throw new IllegalArgumentException("Documentation list cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(List)"); try { final List<T> parsed = new LinkedList<T>(); for (int i = 0, size = documentation.size(); i < size; i++) { final String currentLine = documentation.get(i); if (isParseable(currentLine)) { final DocumentationTagIndexedSmoosher indexedSmoosher = new DocumentationTagIndexedSmoosher(); parsed.add(parseElement(indexedSmoosher.smoosh(i, documentation))); final int endingIndex = indexedSmoosher.getEndingIndex(); if (endingIndex > i) { i = endingIndex - 1; } } } return parsed; } finally { point.collect(); } }  List<T> parse(final List<String> documentation);  }