@Test public void testParse_sourceMethod() throws URISyntaxException, SAXException, IOException, VerifierConfigurationException { Path exclusionFile = absolutePathOfResource("exclusion-sample-rules/source-method.xml"); try { ExclusionFiles.parse(exclusionFile); fail(); } catch (SAXParseException expected) { assertEquals( "element \"Method\" not allowed here; expected element \"Class\" or \"Package\"", expected.getMessage()); assertEquals(4, expected.getLineNumber()); } }
static ImmutableList<LinkageErrorMatcher> parse(Path exclusionFile) throws SAXException, IOException, VerifierConfigurationException { InputSource inputSource = new InputSource(Files.newInputStream(exclusionFile)); inputSource.setSystemId(exclusionFile.toUri().toString()); return parse(inputSource); }
ExclusionFiles { static ImmutableList<LinkageErrorMatcher> parse(Path exclusionFile) throws SAXException, IOException, VerifierConfigurationException { InputSource inputSource = new InputSource(Files.newInputStream(exclusionFile)); inputSource.setSystemId(exclusionFile.toUri().toString()); return parse(inputSource); } }
ExclusionFiles { static ImmutableList<LinkageErrorMatcher> parse(Path exclusionFile) throws SAXException, IOException, VerifierConfigurationException { InputSource inputSource = new InputSource(Files.newInputStream(exclusionFile)); inputSource.setSystemId(exclusionFile.toUri().toString()); return parse(inputSource); }  }
ExclusionFiles { static ImmutableList<LinkageErrorMatcher> parse(Path exclusionFile) throws SAXException, IOException, VerifierConfigurationException { InputSource inputSource = new InputSource(Files.newInputStream(exclusionFile)); inputSource.setSystemId(exclusionFile.toUri().toString()); return parse(inputSource); }   }
ExclusionFiles { static ImmutableList<LinkageErrorMatcher> parse(Path exclusionFile) throws SAXException, IOException, VerifierConfigurationException { InputSource inputSource = new InputSource(Files.newInputStream(exclusionFile)); inputSource.setSystemId(exclusionFile.toUri().toString()); return parse(inputSource); }    }