From 60084e907257c72f5ad060be38b31dc25c93ed37 Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Mon, 12 May 2025 13:54:16 +0200 Subject: [PATCH] Remove unused code fromXml, toXml. --- .../maven/impl/DefaultModelXmlFactory.java | 24 ------------------- .../maven/impl/DefaultPluginXmlFactory.java | 24 ------------------- 2 files changed, 48 deletions(-) diff --git a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultModelXmlFactory.java b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultModelXmlFactory.java index 7a5abd7d8235..ecbef1dae215 100644 --- a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultModelXmlFactory.java +++ b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultModelXmlFactory.java @@ -141,28 +141,4 @@ public void write(XmlWriterRequest request) throws XmlWriterException { throw new XmlWriterException("Unable to write model: " + getMessage(e), getLocation(e), e); } } - - /** - * Simply parse the given xml string. - * - * @param xml the input XML string - * @return the parsed object - * @throws XmlReaderException if an error occurs during the parsing - * @see #toXmlString(Object) - */ - public static Model fromXml(@Nonnull String xml) throws XmlReaderException { - return new DefaultModelXmlFactory().fromXmlString(xml); - } - - /** - * Simply converts the given content to an XML string. - * - * @param content the object to convert - * @return the XML string representation - * @throws XmlWriterException if an error occurs during the transformation - * @see #fromXmlString(String) - */ - public static String toXml(@Nonnull Model content) throws XmlWriterException { - return new DefaultModelXmlFactory().toXmlString(content); - } } diff --git a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultPluginXmlFactory.java b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultPluginXmlFactory.java index dec67b0257b9..8b09a66662c1 100644 --- a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultPluginXmlFactory.java +++ b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultPluginXmlFactory.java @@ -100,28 +100,4 @@ public void write(XmlWriterRequest request) throws XmlWriterEx throw new XmlWriterException("Unable to write plugin: " + getMessage(e), getLocation(e), e); } } - - /** - * Simply parse the given xml string. - * - * @param xml the input XML string - * @return the parsed object - * @throws XmlReaderException if an error occurs during the parsing - * @see #toXmlString(Object) - */ - public static PluginDescriptor fromXml(@Nonnull String xml) throws XmlReaderException { - return new DefaultPluginXmlFactory().fromXmlString(xml); - } - - /** - * Simply converts the given content to an XML string. - * - * @param content the object to convert - * @return the XML string representation - * @throws XmlWriterException if an error occurs during the transformation - * @see #fromXmlString(String) - */ - public static String toXml(@Nonnull PluginDescriptor content) throws XmlWriterException { - return new DefaultPluginXmlFactory().toXmlString(content); - } }