You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2020/07/20 12:41:06 UTC

[maven-shared-utils] 01/01: deprecate XmlStreamReader

This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch i848B
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git

commit 7e903844dae3418a7fd9414b2a71a70569ca3db8
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Mon Jul 20 08:40:52 2020 -0400

    deprecate XmlStreamReader
---
 .../apache/maven/shared/utils/ReaderFactory.java   |  2 +-
 .../maven/shared/utils/xml/XmlStreamReader.java    | 41 +++++++++++-----------
 2 files changed, 22 insertions(+), 21 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..5ab8967 100644
--- a/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java
+++ b/src/main/java/org/apache/maven/shared/utils/ReaderFactory.java
@@ -135,7 +135,7 @@ 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
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()
     {