This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new 72b1f88f Javadoc
72b1f88f is described below
commit 72b1f88fb722def136ce87c9b2bfdd3c9126bb3d
Author: Gary Gregory <[email protected]>
AuthorDate: Mon Jul 24 08:04:20 2023 -0400
Javadoc
---
src/changes/changes.xml | 5 ++++-
.../org/apache/commons/io/input/XmlStreamReader.java | 10 +++++-----
.../commons/io/input/XmlStreamReaderUtilitiesTest.java | 2 +-
.../io/input/compatibility/XmlStreamReader.java | 18 +++++++++---------
4 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c38afdbf..c3159c7a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -53,7 +53,7 @@ The <action> type attribute can be add,update,fix,remove.
ReaderInputStream.read() throws an exception instead of returning -1
when called again after returning -1.
</action>
<action dev="ggregory" type="fix" issue="IO-804" due-to="Elliotte Rusty
Harold, Gary Gregory">
- FileUtils.forceMkdirParent() Javadoc is likely incorrect.
+ FileUtils.forceMkdirParent() Javadoc is incorrect.
</action>
<action dev="ggregory" type="fix" due-to="step-security-bot, Gary
Gregory">
[StepSecurity] ci: Harden GitHub Actions #461.
@@ -61,6 +61,9 @@ The <action> type attribute can be add,update,fix,remove.
<action dev="ggregory" type="fix" due-to="Gary Gregory">
MagicNumberFileFilter.accept(Path, BasicFileAttributes) doesn't its
byteOffset before reading.
</action>
+ <action dev="ggregory" type="fix" due-to="Gary Gregory">
+ Javadoc improvements.
+ </action>
<!-- ADD -->
<action dev="ggregory" type="add" due-to="Gary Gregory">
Add DeferredFileOutputStream.getPath().
diff --git a/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
b/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
index 1e0c2f4a..550af9ee 100644
--- a/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
+++ b/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
@@ -208,7 +208,7 @@ public class XmlStreamReader extends Reader {
private static final String RAW_EX_2 = "Illegal encoding, BOM [{0}] XML
guess [{1}] XML prolog [{2}] unknown BOM";
- private static final String HTTP_EX_1 = "Illegal encoding, CT-MIME [{0}]
CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], BOM must be NULL";
+ private static final String HTTP_EX_1 = "Illegal encoding, CT-MIME [{0}]
CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], BOM must be null";
private static final String HTTP_EX_2 = "Illegal encoding, CT-MIME [{0}]
CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], encoding mismatch";
@@ -225,7 +225,7 @@ public class XmlStreamReader extends Reader {
}
/**
- * Gets the charset parameter value, NULL if not present, NULL if
httpContentType is NULL.
+ * Gets the charset parameter value, {@code null} if not present, {@code
null} if httpContentType is {@code null}.
*
* @param httpContentType the HTTP content type
* @return The content type encoding (upcased)
@@ -245,7 +245,7 @@ public class XmlStreamReader extends Reader {
}
/**
- * Gets the MIME type or NULL if httpContentType is NULL.
+ * Gets the MIME type or {@code null} if httpContentType is {@code null}.
*
* @param httpContentType the HTTP content type
* @return The mime content type
@@ -265,7 +265,7 @@ public class XmlStreamReader extends Reader {
}
/**
- * Gets the encoding declared in the <?xml encoding=...?>, NULL if none.
+ * Gets the encoding declared in the <?xml encoding=...?>, {@code null} if
none.
*
* @param inputStream InputStream to create the reader from.
* @param guessedEnc guessed encoding
@@ -855,7 +855,7 @@ public class XmlStreamReader extends Reader {
/**
* Gets the default encoding to use if none is set in HTTP content-type,
XML prolog and the rules based on content-type are not adequate.
* <p>
- * If it is NULL the content-type based rules are used.
+ * If it is {@code null} the content-type based rules are used.
* </p>
*
* @return the default encoding to use.
diff --git
a/src/test/java/org/apache/commons/io/input/XmlStreamReaderUtilitiesTest.java
b/src/test/java/org/apache/commons/io/input/XmlStreamReaderUtilitiesTest.java
index f4c2dee1..e2cd2e68 100644
---
a/src/test/java/org/apache/commons/io/input/XmlStreamReaderUtilitiesTest.java
+++
b/src/test/java/org/apache/commons/io/input/XmlStreamReaderUtilitiesTest.java
@@ -38,7 +38,7 @@ public class XmlStreamReaderUtilitiesTest {
}
private static final String RAWMGS1 = "encoding mismatch";
private static final String RAWMGS2 = "unknown BOM";
- private static final String HTTPMGS1 = "BOM must be NULL";
+ private static final String HTTPMGS1 = "BOM must be null";
private static final String HTTPMGS2 = "encoding mismatch";
private static final String HTTPMGS3 = "Illegal MIME";
diff --git
a/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
b/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
index 928ac115..a8299dc7 100644
---
a/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
+++
b/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
@@ -104,7 +104,7 @@ public class XmlStreamReader extends Reader {
"Illegal encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}]
unknown BOM");
private static final MessageFormat HTTP_EX_1 = new MessageFormat(
- "Illegal encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess
[{3}] XML prolog [{4}], BOM must be NULL");
+ "Illegal encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess
[{3}] XML prolog [{4}], BOM must be null");
private static final MessageFormat HTTP_EX_2 = new MessageFormat(
"Illegal encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess
[{3}] XML prolog [{4}], encoding mismatch");
@@ -112,7 +112,7 @@ public class XmlStreamReader extends Reader {
private static final MessageFormat HTTP_EX_3 = new MessageFormat(
"Illegal encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess
[{3}] XML prolog [{4}], Illegal MIME");
- // returns the BOM in the stream, NULL if not present,
+ // returns the BOM in the stream, null if not present,
// if there was BOM the in the stream it is consumed
static String getBOMEncoding(final BufferedInputStream is)
throws IOException {
@@ -141,8 +141,8 @@ public class XmlStreamReader extends Reader {
return encoding;
}
- // returns charset parameter value, NULL if not present, NULL if
- // httpContentType is NULL
+ // returns charset parameter value, null if not present, null if
+ // httpContentType is null
static String getContentTypeEncoding(final String httpContentType) {
String encoding = null;
if (httpContentType != null) {
@@ -157,7 +157,7 @@ public class XmlStreamReader extends Reader {
return encoding;
}
- // returns MIME type or NULL if httpContentType is NULL
+ // returns MIME type or null if httpContentType is null
static String getContentTypeMime(final String httpContentType) {
String mime = null;
if (httpContentType != null) {
@@ -172,7 +172,7 @@ public class XmlStreamReader extends Reader {
* Returns the default encoding to use if none is set in HTTP content-type,
* XML prolog and the rules based on content-type are not adequate.
* <p>
- * If it is NULL the content-type based rules are used.
+ * If it is null the content-type based rules are used.
*
* @return the default encoding to use.
*/
@@ -209,7 +209,7 @@ public class XmlStreamReader extends Reader {
return encoding;
}
- // returns the encoding declared in the <?xml encoding=...?>, NULL if none
+ // returns the encoding declared in the <?xml encoding=...?>, null if none
private static String getXmlProlog(final BufferedInputStream is, final
String guessedEnc)
throws IOException {
String encoding = null;
@@ -278,9 +278,9 @@ public class XmlStreamReader extends Reader {
* Sets the default encoding to use if none is set in HTTP content-type,
XML
* prolog and the rules based on content-type are not adequate.
* <p>
- * If it is set to NULL the content-type based rules are used.
+ * If it is set to null the content-type based rules are used.
* <p>
- * By default it is NULL.
+ * By default it is null.
*
* @param encoding charset encoding to default to.
*/