This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git
The following commit(s) were added to refs/heads/master by this push: new 5ff997c [MSHARED-848] deprecate XmlStreamReader (#59) 5ff997c is described below commit 5ff997cac035ac7d2ab84bbd2c695c6e60798400 Author: Elliotte Rusty Harold <elh...@users.noreply.github.com> AuthorDate: Mon Jul 20 13:18:06 2020 +0000 [MSHARED-848] deprecate XmlStreamReader (#59) * deprecate XmlStreamReader * deprecate newXmlReader methods in favor of apache commons --- .../apache/maven/shared/utils/ReaderFactory.java | 11 +++--- .../maven/shared/utils/xml/XmlStreamReader.java | 41 +++++++++++----------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java b/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java index 4ec103a..a92a1bd 100644 --- a/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java +++ b/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java @@ -110,8 +110,9 @@ public class ReaderFactory * @param in not null input stream * @return an XML reader instance for the input stream * @throws IOException if any - * @see XmlStreamReader + * @deprecated use org.apache.commons.io.input.XmlStreamReader instead */ + @Deprecated public static Reader newXmlReader( @Nonnull InputStream in ) throws IOException { @@ -124,8 +125,9 @@ public class ReaderFactory * @param file not null file * @return an XML reader instance for the input file * @throws IOException if any - * @see XmlStreamReader + * @deprecated use org.apache.commons.io.input.XmlStreamReader instead */ + @Deprecated public static Reader newXmlReader( @Nonnull File file ) throws IOException { @@ -135,11 +137,12 @@ public class ReaderFactory /** * Create a new Reader with XML encoding detection rules. * - * @param url not null url + * @param url not null URL * @return an XML reader instance for the input URL * @throws IOException if any - * @see XmlStreamReader + * @deprecated use {@code org.apache.commons.io.input.XmlStreamReader} instead */ + @Deprecated public static Reader newXmlReader( @Nonnull URL url ) throws IOException { diff --git a/src/main/java/org/apache/maven/shared/utils/xml/XmlStreamReader.java b/src/main/java/org/apache/maven/shared/utils/xml/XmlStreamReader.java index 11a5777..6990d4f 100644 --- a/src/main/java/org/apache/maven/shared/utils/xml/XmlStreamReader.java +++ b/src/main/java/org/apache/maven/shared/utils/xml/XmlStreamReader.java @@ -29,8 +29,9 @@ import java.net.URLConnection; import java.util.regex.Pattern; /** - * + * @deprecated use org.apache.commons.io.input.XmlStreamReader instead */ +@Deprecated public class XmlStreamReader extends Reader { @@ -56,7 +57,7 @@ public class XmlStreamReader /** * @param file The file to create it from. - * @throws IOException in case of an error. + * @throws IOException in case of an error */ public XmlStreamReader( File file ) throws IOException @@ -66,7 +67,7 @@ public class XmlStreamReader /** * @param is {@link InputStream} - * @throws IOException in case of an error. + * @throws IOException in case of an error */ public XmlStreamReader( InputStream is ) throws IOException @@ -77,8 +78,8 @@ public class XmlStreamReader /** * @param is {@link InputStream} * @param lenient yes/no - * @throws IOException in case of an error. - * @throws XmlStreamReaderException in case of an error. + * @throws IOException in case of an error + * @throws XmlStreamReaderException in case of an error */ public XmlStreamReader( InputStream is, boolean lenient ) throws IOException, XmlStreamReaderException @@ -88,7 +89,7 @@ public class XmlStreamReader /** * @param url {@link URL} - * @throws IOException in case of error. + * @throws IOException in case of error */ public XmlStreamReader( URL url ) throws IOException @@ -97,8 +98,8 @@ public class XmlStreamReader } /** - * @param conn The URL connection {@link URLConnection}. - * @throws IOException in case of error. + * @param conn The URL connection {@link URLConnection} + * @throws IOException in case of error */ public XmlStreamReader( URLConnection conn ) throws IOException @@ -108,8 +109,8 @@ public class XmlStreamReader /** * @param is {@link InputStream} - * @param httpContentType content type. - * @throws IOException in case of error. + * @param httpContentType content type + * @throws IOException in case of error */ public XmlStreamReader( InputStream is, String httpContentType ) throws IOException @@ -119,11 +120,11 @@ public class XmlStreamReader /** * @param is {@link InputStream} - * @param httpContentType content type. - * @param lenient yes/no. - * @param defaultEncoding The default encoding. - * @throws IOException in case of error. - * @throws XmlStreamReaderException in case of error. + * @param httpContentType content type + * @param lenient yes/no + * @param defaultEncoding the default encoding + * @throws IOException in case of error + * @throws XmlStreamReaderException in case of error */ public XmlStreamReader( InputStream is, String httpContentType, boolean lenient, String defaultEncoding ) throws IOException, XmlStreamReaderException @@ -136,10 +137,10 @@ public class XmlStreamReader /** * @param is {@link InputStream} - * @param httpContentType content type. - * @param lenient yes/no. - * @throws IOException in case of error. - * @throws XmlStreamReaderException in case of error. + * @param httpContentType content type + * @param lenient yes/no + * @throws IOException in case of error + * @throws XmlStreamReaderException in case of error */ public XmlStreamReader( InputStream is, String httpContentType, boolean lenient ) throws IOException, XmlStreamReaderException @@ -148,7 +149,7 @@ public class XmlStreamReader } /** - * @return The current encoding. + * @return the current encoding */ public String getEncoding() {