Skip to content

Commit

Permalink
[MSHARED-848] deprecate XmlStreamReader (#59)
Browse files Browse the repository at this point in the history
* deprecate XmlStreamReader
* deprecate newXmlReader methods in favor of apache commons
  • Loading branch information
elharo committed Jul 20, 2020
1 parent 914d975 commit 5ff997c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
11 changes: 7 additions & 4 deletions src/main/java/org/apache/maven/shared/utils/ReaderFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -124,8 +125,9 @@ public static Reader newXmlReader( @Nonnull InputStream in )
* @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
{
Expand All @@ -135,11 +137,12 @@ public static Reader newXmlReader( @Nonnull File file )
/**
* 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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
import java.util.regex.Pattern;

/**
*
* @deprecated use org.apache.commons.io.input.XmlStreamReader instead
*/
@Deprecated
public class XmlStreamReader
extends Reader
{
Expand All @@ -56,7 +57,7 @@ public static String getDefaultEncoding()

/**
* @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
Expand All @@ -66,7 +67,7 @@ public XmlStreamReader( File file )

/**
* @param is {@link InputStream}
* @throws IOException in case of an error.
* @throws IOException in case of an error
*/
public XmlStreamReader( InputStream is )
throws IOException
Expand All @@ -77,8 +78,8 @@ public XmlStreamReader( InputStream is )
/**
* @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
Expand All @@ -88,7 +89,7 @@ public XmlStreamReader( InputStream is, boolean lenient )

/**
* @param url {@link URL}
* @throws IOException in case of error.
* @throws IOException in case of error
*/
public XmlStreamReader( URL url )
throws IOException
Expand All @@ -97,8 +98,8 @@ public XmlStreamReader( URL url )
}

/**
* @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
Expand All @@ -108,8 +109,8 @@ public XmlStreamReader( URLConnection conn )

/**
* @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
Expand All @@ -119,11 +120,11 @@ public XmlStreamReader( InputStream is, String httpContentType )

/**
* @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
Expand All @@ -136,10 +137,10 @@ public XmlStreamReader( InputStream is, String httpContentType, boolean lenient,

/**
* @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
Expand All @@ -148,7 +149,7 @@ public XmlStreamReader( InputStream is, String httpContentType, boolean lenient
}

/**
* @return The current encoding.
* @return the current encoding
*/
public String getEncoding()
{
Expand Down

0 comments on commit 5ff997c

Please sign in to comment.