diff --git a/commons-vfs2-jackrabbit1/src/test/java/org/apache/commons/vfs2/provider/webdav/test/JcrUtils.java b/commons-vfs2-jackrabbit1/src/test/java/org/apache/commons/vfs2/provider/webdav/test/JcrUtils.java index 975c09745c..7523daaf30 100644 --- a/commons-vfs2-jackrabbit1/src/test/java/org/apache/commons/vfs2/provider/webdav/test/JcrUtils.java +++ b/commons-vfs2-jackrabbit1/src/test/java/org/apache/commons/vfs2/provider/webdav/test/JcrUtils.java @@ -62,7 +62,7 @@ final class JcrUtils { * @param parent parent node * @param name name of the child node * @return the child node - * @throws RepositoryException if the child node can not be accessed or created + * @throws RepositoryException if the child node cannot be accessed or created */ public static Node getOrAddFolder(final Node parent, final String name) throws RepositoryException { return getOrAddNode(parent, name, NodeType_NT_FOLDER); @@ -80,7 +80,7 @@ public static Node getOrAddFolder(final Node parent, final String name) throws R * @param name name of the child node * @param type type of the child node, ignored if the child already exists * @return the child node - * @throws RepositoryException if the child node can not be accessed or created + * @throws RepositoryException if the child node cannot be accessed or created */ public static Node getOrAddNode(final Node parent, final String name, final String type) throws RepositoryException { @@ -119,7 +119,7 @@ public static Node getOrAddNode(final Node parent, final String name, final Stri * @param mime media type of the file * @param data binary content of the file * @return the child node - * @throws RepositoryException if the child node can not be created or updated + * @throws RepositoryException if the child node cannot be created or updated */ public static Node putFile(final Node parent, final String name, final String mime, final InputStream data) throws RepositoryException { @@ -156,7 +156,7 @@ public static Node putFile(final Node parent, final String name, final String mi * @param data binary content of the file * @param date date of last modification * @return the child node - * @throws RepositoryException if the child node can not be created or updated + * @throws RepositoryException if the child node cannot be created or updated */ public static Node putFile(final Node parent, final String name, final String mime, final InputStream data, final Calendar date) throws RepositoryException { diff --git a/commons-vfs2-jackrabbit2/src/test/java/org/apache/commons/vfs2/provider/webdav4/test/JcrUtils.java b/commons-vfs2-jackrabbit2/src/test/java/org/apache/commons/vfs2/provider/webdav4/test/JcrUtils.java index e6e9b53a01..cb5f7c4345 100644 --- a/commons-vfs2-jackrabbit2/src/test/java/org/apache/commons/vfs2/provider/webdav4/test/JcrUtils.java +++ b/commons-vfs2-jackrabbit2/src/test/java/org/apache/commons/vfs2/provider/webdav4/test/JcrUtils.java @@ -62,7 +62,7 @@ final class JcrUtils { * @param parent parent node * @param name name of the child node * @return the child node - * @throws RepositoryException if the child node can not be accessed or created + * @throws RepositoryException if the child node cannot be accessed or created */ public static Node getOrAddFolder(final Node parent, final String name) throws RepositoryException { return getOrAddNode(parent, name, NodeType_NT_FOLDER); @@ -80,7 +80,7 @@ public static Node getOrAddFolder(final Node parent, final String name) throws R * @param name name of the child node * @param type type of the child node, ignored if the child already exists * @return the child node - * @throws RepositoryException if the child node can not be accessed or created + * @throws RepositoryException if the child node cannot be accessed or created */ public static Node getOrAddNode(final Node parent, final String name, final String type) throws RepositoryException { @@ -119,7 +119,7 @@ public static Node getOrAddNode(final Node parent, final String name, final Stri * @param mime media type of the file * @param data binary content of the file * @return the child node - * @throws RepositoryException if the child node can not be created or updated + * @throws RepositoryException if the child node cannot be created or updated */ public static Node putFile(final Node parent, final String name, final String mime, final InputStream data) throws RepositoryException { @@ -156,7 +156,7 @@ public static Node putFile(final Node parent, final String name, final String mi * @param data binary content of the file * @param date date of last modification * @return the child node - * @throws RepositoryException if the child node can not be created or updated + * @throws RepositoryException if the child node cannot be created or updated */ public static Node putFile(final Node parent, final String name, final String mime, final InputStream data, final Calendar date) throws RepositoryException { diff --git a/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/util/SharedRandomContentInputStream.java b/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/util/SharedRandomContentInputStream.java index 048bae768a..527219709f 100644 --- a/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/util/SharedRandomContentInputStream.java +++ b/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/util/SharedRandomContentInputStream.java @@ -150,7 +150,7 @@ public synchronized int read(final byte[] b, final int off, int len) throws IOEx } if (fileEnd > -1 && calcFilePosition(len) > fileEnd) { - // we can not read past our end + // we cannot read past our end len = (int) (fileEnd - getFilePosition()); } @@ -174,7 +174,7 @@ public synchronized long skip(long n) throws IOException { } if (fileEnd > -1 && calcFilePosition(n) > fileEnd) { - // we can not skip past our end + // we cannot skip past our end n = fileEnd - getFilePosition(); } diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileName.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileName.java index a31fd86b54..4858318714 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileName.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileName.java @@ -74,7 +74,7 @@ public interface FileName extends Comparable { /** * Gets a "friendly path", this is a path without a password. *

- * This path can not be used to resolve the path again. + * This path cannot be used to resolve the path again. *

* * @return the friendly URI as a String. diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileData.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileData.java index 6d519179f8..ecc8ae4692 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileData.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileData.java @@ -70,7 +70,7 @@ final class RamFileData implements Serializable { children = Collections.synchronizedCollection(new ArrayList<>()); clear(); if (name == null) { - throw new IllegalArgumentException("name can not be null"); + throw new IllegalArgumentException("name cannot be null"); } this.name = name; }