File tree Expand file tree Collapse file tree
impl/maven-impl/src/main/java/org/apache/maven/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,35 +93,11 @@ public void write(XmlWriterRequest<PluginDescriptor> request) throws XmlWriterEx
9393 new PluginDescriptorStaxWriter ().write (outputStream , content );
9494 } else {
9595 try (OutputStream os = Files .newOutputStream (path )) {
96- new PluginDescriptorStaxWriter ().write (outputStream , content );
96+ new PluginDescriptorStaxWriter ().write (os , content );
9797 }
9898 }
9999 } catch (Exception e ) {
100100 throw new XmlWriterException ("Unable to write plugin: " + getMessage (e ), getLocation (e ), e );
101101 }
102102 }
103-
104- /**
105- * Simply parse the given xml string.
106- *
107- * @param xml the input XML string
108- * @return the parsed object
109- * @throws XmlReaderException if an error occurs during the parsing
110- * @see #toXmlString(Object)
111- */
112- public static PluginDescriptor fromXml (@ Nonnull String xml ) throws XmlReaderException {
113- return new DefaultPluginXmlFactory ().fromXmlString (xml );
114- }
115-
116- /**
117- * Simply converts the given content to an XML string.
118- *
119- * @param content the object to convert
120- * @return the XML string representation
121- * @throws XmlWriterException if an error occurs during the transformation
122- * @see #fromXmlString(String)
123- */
124- public static String toXml (@ Nonnull PluginDescriptor content ) throws XmlWriterException {
125- return new DefaultPluginXmlFactory ().toXmlString (content );
126- }
127103}
You can’t perform that action at this time.
0 commit comments