@Test public void testReadFromResourceThrowsNullPointerOnNull() throws ODataJPAModelException, IOException { assertThrows(NullPointerException.class, () -> cut.readFromResource(null, charset)); assertThrows(NullPointerException.class, () -> cut.readFromResource(CORE_ANNOTATIONS, null)); }
public CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset) throws IOException, ODataJPAModelException { if (Objects.requireNonNull(path).isEmpty()) return null; return xmlMapper.readValue(loadXML(path, Objects.requireNonNull(charset)), CsdlDocument.class); }
CsdlDocumentReader { public CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset) throws IOException, ODataJPAModelException { if (Objects.requireNonNull(path).isEmpty()) return null; return xmlMapper.readValue(loadXML(path, Objects.requireNonNull(charset)), CsdlDocument.class); } }
CsdlDocumentReader { public CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset) throws IOException, ODataJPAModelException { if (Objects.requireNonNull(path).isEmpty()) return null; return xmlMapper.readValue(loadXML(path, Objects.requireNonNull(charset)), CsdlDocument.class); } CsdlDocumentReader(); }
CsdlDocumentReader { public CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset) throws IOException, ODataJPAModelException { if (Objects.requireNonNull(path).isEmpty()) return null; return xmlMapper.readValue(loadXML(path, Objects.requireNonNull(charset)), CsdlDocument.class); } CsdlDocumentReader(); CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset); CsdlDocument readFromURI(@Nonnull final URI uri); }
CsdlDocumentReader { public CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset) throws IOException, ODataJPAModelException { if (Objects.requireNonNull(path).isEmpty()) return null; return xmlMapper.readValue(loadXML(path, Objects.requireNonNull(charset)), CsdlDocument.class); } CsdlDocumentReader(); CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset); CsdlDocument readFromURI(@Nonnull final URI uri);  }