@Test public void testReadModel_emptyInputStreamIsNull() throws Exception { Model model = MavenModels.readModel(new ByteArrayInputStream(new byte[0])); assertThat(model, nullValue()); }
@Nullable public static Model readModel(final InputStream inputStream) throws IOException { try (InputStream is = inputStream) { return MODEL_READER.read(is, false); } catch (XmlPullParserException | EOFException e ) { log.debug("Could not parse XML into Model", e); return null; } }
MavenModels { @Nullable public static Model readModel(final InputStream inputStream) throws IOException { try (InputStream is = inputStream) { return MODEL_READER.read(is, false); } catch (XmlPullParserException | EOFException e ) { log.debug("Could not parse XML into Model", e); return null; } } }
MavenModels { @Nullable public static Model readModel(final InputStream inputStream) throws IOException { try (InputStream is = inputStream) { return MODEL_READER.read(is, false); } catch (XmlPullParserException | EOFException e ) { log.debug("Could not parse XML into Model", e); return null; } } private  MavenModels(); }
MavenModels { @Nullable public static Model readModel(final InputStream inputStream) throws IOException { try (InputStream is = inputStream) { return MODEL_READER.read(is, false); } catch (XmlPullParserException | EOFException e ) { log.debug("Could not parse XML into Model", e); return null; } } private  MavenModels(); static Xpp3Dom parseDom(final InputStream is); @Nullable static Metadata readMetadata(final InputStream inputStream); static void writeMetadata(final OutputStream outputStream, final Metadata metadata); @Nullable static ArchetypeCatalog readArchetypeCatalog(final InputStream inputStream); static void writeArchetypeCatalog(final OutputStream outputStream, final ArchetypeCatalog archetypeCatalog); @Nullable static Model readModel(final InputStream inputStream); }
MavenModels { @Nullable public static Model readModel(final InputStream inputStream) throws IOException { try (InputStream is = inputStream) { return MODEL_READER.read(is, false); } catch (XmlPullParserException | EOFException e ) { log.debug("Could not parse XML into Model", e); return null; } } private  MavenModels(); static Xpp3Dom parseDom(final InputStream is); @Nullable static Metadata readMetadata(final InputStream inputStream); static void writeMetadata(final OutputStream outputStream, final Metadata metadata); @Nullable static ArchetypeCatalog readArchetypeCatalog(final InputStream inputStream); static void writeArchetypeCatalog(final OutputStream outputStream, final ArchetypeCatalog archetypeCatalog); @Nullable static Model readModel(final InputStream inputStream);  }