@Test public void testParseNullDeclaration() { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> { parser.parse(null); }); assertThat(e.getMessage()).isEqualTo("Subroutine declaration cannot be null."); }
public SubroutineDeclaration parse(final String declaration) { if (declaration == null) { throw new IllegalArgumentException("Subroutine declaration cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); String reducedDeclaration = reduceDeclaration(uncommentDeclaration(declaration).trim()); try { return new SubroutineDeclaration(parseName(declaration, reducedDeclaration), parseReturnType(declaration, reducedDeclaration), parseArguments(reducedDeclaration)); } finally { point.collect(); } }
SubroutineDeclarationParser { public SubroutineDeclaration parse(final String declaration) { if (declaration == null) { throw new IllegalArgumentException("Subroutine declaration cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); String reducedDeclaration = reduceDeclaration(uncommentDeclaration(declaration).trim()); try { return new SubroutineDeclaration(parseName(declaration, reducedDeclaration), parseReturnType(declaration, reducedDeclaration), parseArguments(reducedDeclaration)); } finally { point.collect(); } } }
SubroutineDeclarationParser { public SubroutineDeclaration parse(final String declaration) { if (declaration == null) { throw new IllegalArgumentException("Subroutine declaration cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); String reducedDeclaration = reduceDeclaration(uncommentDeclaration(declaration).trim()); try { return new SubroutineDeclaration(parseName(declaration, reducedDeclaration), parseReturnType(declaration, reducedDeclaration), parseArguments(reducedDeclaration)); } finally { point.collect(); } }  }
SubroutineDeclarationParser { public SubroutineDeclaration parse(final String declaration) { if (declaration == null) { throw new IllegalArgumentException("Subroutine declaration cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); String reducedDeclaration = reduceDeclaration(uncommentDeclaration(declaration).trim()); try { return new SubroutineDeclaration(parseName(declaration, reducedDeclaration), parseReturnType(declaration, reducedDeclaration), parseArguments(reducedDeclaration)); } finally { point.collect(); } }  SubroutineDeclaration parse(final String declaration); }
SubroutineDeclarationParser { public SubroutineDeclaration parse(final String declaration) { if (declaration == null) { throw new IllegalArgumentException("Subroutine declaration cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); String reducedDeclaration = reduceDeclaration(uncommentDeclaration(declaration).trim()); try { return new SubroutineDeclaration(parseName(declaration, reducedDeclaration), parseReturnType(declaration, reducedDeclaration), parseArguments(reducedDeclaration)); } finally { point.collect(); } }  SubroutineDeclaration parse(final String declaration);  }