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-vfs.git
The following commit(s) were added to refs/heads/master by this push:
new e0291128b Update from deprecated code
e0291128b is described below
commit e0291128b3d51d00da4ce25793fbfafb2f954640
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Nov 30 08:42:15 2025 -0500
Update from deprecated code
---
.../org/apache/commons/vfs2/provider/local/GenericFileNameParser.java | 4 ++--
.../org/apache/commons/vfs2/provider/sftp/SftpTestServerHelper.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java
index 211a8ad4c..a8d46e631 100644
---
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java
+++
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java
@@ -16,7 +16,7 @@
*/
package org.apache.commons.vfs2.provider.local;
-import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.Strings;
import org.apache.commons.vfs2.FileName;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.FileType;
@@ -62,7 +62,7 @@ public class GenericFileNameParser extends
LocalFileNameParser {
// TODO - this class isn't generic at all. Need to fix this
// Looking for "/"
final String prefix = "/";
- if (!StringUtils.startsWith(name, prefix)) {
+ if (!Strings.CS.startsWith(name, prefix)) {
throw new
FileSystemException("vfs.provider.local/not-absolute-file-name.error", uri);
}
// do not strip the separator, BUT also return it ...
diff --git
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/SftpTestServerHelper.java
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/SftpTestServerHelper.java
index 4e09f5df4..8e000614c 100644
---
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/SftpTestServerHelper.java
+++
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/SftpTestServerHelper.java
@@ -31,7 +31,7 @@ import java.util.List;
import java.util.TreeMap;
import org.apache.commons.io.file.PathUtils;
-import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.Strings;
import org.apache.sshd.SshServer;
import org.apache.sshd.common.NamedFactory;
import org.apache.sshd.common.Session;
@@ -379,7 +379,7 @@ public final class SftpTestServerHelper {
server.setSubsystemFactories(list);
// Set up authentication
- server.setPasswordAuthenticator((username, password, session) ->
StringUtils.equals(username, password));
+ server.setPasswordAuthenticator((username, password, session) ->
Strings.CS.equals(username, password));
server.setPublickeyAuthenticator((username, key, session) -> true);
// Set up forwarding