Skip to content

Commit e029112

Browse files
committed
Update from deprecated code
1 parent 8e5e156 commit e029112

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
package org.apache.commons.vfs2.provider.local;
1818

19-
import org.apache.commons.lang3.StringUtils;
19+
import org.apache.commons.lang3.Strings;
2020
import org.apache.commons.vfs2.FileName;
2121
import org.apache.commons.vfs2.FileSystemException;
2222
import org.apache.commons.vfs2.FileType;
@@ -62,7 +62,7 @@ protected String extractRootPrefix(final String uri, final StringBuilder name) t
6262
// TODO - this class isn't generic at all. Need to fix this
6363
// Looking for "/"
6464
final String prefix = "/";
65-
if (!StringUtils.startsWith(name, prefix)) {
65+
if (!Strings.CS.startsWith(name, prefix)) {
6666
throw new FileSystemException("vfs.provider.local/not-absolute-file-name.error", uri);
6767
}
6868
// do not strip the separator, BUT also return it ...

commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/SftpTestServerHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import java.util.TreeMap;
3232

3333
import org.apache.commons.io.file.PathUtils;
34-
import org.apache.commons.lang3.StringUtils;
34+
import org.apache.commons.lang3.Strings;
3535
import org.apache.sshd.SshServer;
3636
import org.apache.sshd.common.NamedFactory;
3737
import org.apache.sshd.common.Session;
@@ -379,7 +379,7 @@ public String getName() {
379379
server.setSubsystemFactories(list);
380380

381381
// Set up authentication
382-
server.setPasswordAuthenticator((username, password, session) -> StringUtils.equals(username, password));
382+
server.setPasswordAuthenticator((username, password, session) -> Strings.CS.equals(username, password));
383383
server.setPublickeyAuthenticator((username, key, session) -> true);
384384

385385
// Set up forwarding

0 commit comments

Comments
 (0)