You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pa...@apache.org on 2017/04/25 19:01:00 UTC
commons-io git commit: Correct error message in IOUtils (closes #35)
Repository: commons-io
Updated Branches:
refs/heads/master 156653ea5 -> 337828003
Correct error message in IOUtils (closes #35)
This corrects the wording of the error message in IOUtils: There's
no such word as "readed", and the author probably meant "expected"
as opposed to "excepted".
Project: http://git-wip-us.apache.org/repos/asf/commons-io/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-io/commit/33782800
Tree: http://git-wip-us.apache.org/repos/asf/commons-io/tree/33782800
Diff: http://git-wip-us.apache.org/repos/asf/commons-io/diff/33782800
Branch: refs/heads/master
Commit: 3378280035f388157e007a06f7fcb74698b91e3e
Parents: 156653e
Author: Mark Raynsford <co...@io7m.com>
Authored: Tue Apr 25 17:40:34 2017 +0000
Committer: pascalschumacher <pa...@gmx.net>
Committed: Tue Apr 25 21:00:25 2017 +0200
----------------------------------------------------------------------
src/main/java/org/apache/commons/io/IOUtils.java | 2 +-
src/test/java/org/apache/commons/io/IOUtilsTestCase.java | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-io/blob/33782800/src/main/java/org/apache/commons/io/IOUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/io/IOUtils.java b/src/main/java/org/apache/commons/io/IOUtils.java
index daa9505..70caf4f 100644
--- a/src/main/java/org/apache/commons/io/IOUtils.java
+++ b/src/main/java/org/apache/commons/io/IOUtils.java
@@ -825,7 +825,7 @@ public class IOUtils {
}
if (offset != size) {
- throw new IOException("Unexpected readed size. current: " + offset + ", excepted: " + size);
+ throw new IOException("Unexpected read size. current: " + offset + ", expected: " + size);
}
return data;
http://git-wip-us.apache.org/repos/asf/commons-io/blob/33782800/src/test/java/org/apache/commons/io/IOUtilsTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/io/IOUtilsTestCase.java b/src/test/java/org/apache/commons/io/IOUtilsTestCase.java
index a29a41e..83870a8 100644
--- a/src/test/java/org/apache/commons/io/IOUtilsTestCase.java
+++ b/src/test/java/org/apache/commons/io/IOUtilsTestCase.java
@@ -926,10 +926,10 @@ public class IOUtilsTestCase extends FileBasedTestCase {
try (FileInputStream fin = new FileInputStream(m_testFile)) {
IOUtils.toByteArray(fin, m_testFile.length() + 1);
- fail("IOException excepted");
+ fail("IOException expected");
} catch (final IOException exc) {
- assertTrue("Exception message does not start with \"Unexpected readed size\"",
- exc.getMessage().startsWith("Unexpected readed size"));
+ assertTrue("Exception message does not start with \"Unexpected read size\"",
+ exc.getMessage().startsWith("Unexpected read size"));
}
}
@@ -938,7 +938,7 @@ public class IOUtilsTestCase extends FileBasedTestCase {
try (FileInputStream fin = new FileInputStream(m_testFile)) {
IOUtils.toByteArray(fin, (long) Integer.MAX_VALUE + 1);
- fail("IOException excepted");
+ fail("IOException expected");
} catch (final IllegalArgumentException exc) {
assertTrue("Exception message does not start with \"Size cannot be greater than Integer max value\"", exc
.getMessage().startsWith("Size cannot be greater than Integer max value"));