@Test public void testParse_exceptionSystemId() throws URISyntaxException, SAXException, IOException, VerifierConfigurationException { String resourceName = "exclusion-sample-rules/source-method.xml"; Path exclusionFile = absolutePathOfResource(resourceName); try { ExclusionFiles.parse(exclusionFile); fail(); } catch (SAXParseException expected) { assertEquals(4, expected.getLineNumber()); Truth.assertThat(expected.getSystemId()).endsWith(resourceName); String systemId = expected.getSystemId(); Truth.assertThat(systemId).startsWith("file:"); Truth.assertThat(systemId).endsWith(resourceName); } }
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); }    }