From d8bdae7ab8f837a4d3aff966e044871ac5e4a82f Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Tue, 5 Nov 2024 05:55:20 -0500 Subject: [PATCH] Use preferred spelling for "cannot" --- .../org/apache/commons/io/input/AutoCloseInputStream.java | 2 +- .../org/apache/commons/io/input/XmlStreamReaderException.java | 2 +- .../java/org/apache/commons/io/input/XmlStreamReaderTest.java | 4 ++-- .../io/input/compatibility/XmlStreamReaderException.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/apache/commons/io/input/AutoCloseInputStream.java b/src/main/java/org/apache/commons/io/input/AutoCloseInputStream.java index 16276f9093e..aad0fd5e7a5 100644 --- a/src/main/java/org/apache/commons/io/input/AutoCloseInputStream.java +++ b/src/main/java/org/apache/commons/io/input/AutoCloseInputStream.java @@ -136,7 +136,7 @@ protected void afterRead(final int n) throws IOException { * first called. *

* - * @throws IOException if the underlying input stream can not be closed + * @throws IOException if the underlying input stream cannot be closed */ @Override public void close() throws IOException { diff --git a/src/main/java/org/apache/commons/io/input/XmlStreamReaderException.java b/src/main/java/org/apache/commons/io/input/XmlStreamReaderException.java index cbaa844a276..bc506509a13 100644 --- a/src/main/java/org/apache/commons/io/input/XmlStreamReaderException.java +++ b/src/main/java/org/apache/commons/io/input/XmlStreamReaderException.java @@ -20,7 +20,7 @@ /** * The XmlStreamReaderException is thrown by the XmlStreamReader constructors if - * the charset encoding can not be determined according to the XML 1.0 + * the charset encoding cannot be determined according to the XML 1.0 * specification and RFC 3023. *

* The exception returns the unconsumed InputStream to allow the application to diff --git a/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java b/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java index 4260a1aa6ae..385a12b7846 100644 --- a/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java +++ b/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java @@ -212,7 +212,7 @@ public void testAlternateDefaultEncoding(final String contentType, final String private void testAlternateDefaultEncoding(final String streamEnc, final String alternateEnc, final XmlStreamReader xmlReader) { assertEquals(xmlReader.getDefaultEncoding(), alternateEnc); if (!streamEnc.equals(UTF_16)) { - // we can not assert things here because UTF-8, US-ASCII and + // we cannot assert things here because UTF-8, US-ASCII and // ISO-8859-1 look alike for the chars used for detection // (niallp 2010-10-06 - I re-instated the check below - the tests(6) passed) final String enc = alternateEnc != null ? alternateEnc : streamEnc; @@ -449,7 +449,7 @@ public void testHttpValid(final String cT, final String bomEnc, final String str try (InputStream is = getXmlInputStream(bomEnc, prologEnc == null ? XML1 : XML3, streamEnc, prologEnc); XmlStreamReader xmlReader = new XmlStreamReader(is, cT, false)) { if (!streamEnc.equals(UTF_16)) { - // we can not assert things here because UTF-8, US-ASCII and + // we cannot assert things here because UTF-8, US-ASCII and // ISO-8859-1 look alike for the chars used for detection // (niallp 2010-10-06 - I re-instated the check below and removed the 2 tests that failed) assertEquals(xmlReader.getEncoding(), streamEnc); diff --git a/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReaderException.java b/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReaderException.java index 97e377b3653..3391423e57b 100644 --- a/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReaderException.java +++ b/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReaderException.java @@ -20,7 +20,7 @@ /** * The XmlStreamReaderException is thrown by the XmlStreamReader constructors if - * the charset encoding can not be determined according to the XML 1.0 + * the charset encoding cannot be determined according to the XML 1.0 * specification and RFC 3023. *

* The exception returns the unconsumed InputStream to allow the application to