mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-09 00:18:39 +03:00
deque recommended over stack
This commit is contained in:
@@ -21,10 +21,11 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Deque;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Stack;
|
|
||||||
|
|
||||||
public class SFTPClient {
|
public class SFTPClient {
|
||||||
|
|
||||||
@@ -88,7 +89,7 @@ public class SFTPClient {
|
|||||||
|
|
||||||
public void mkdirs(String path)
|
public void mkdirs(String path)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
final Stack<String> dirsToMake = new Stack<String>();
|
final Deque<String> dirsToMake = new LinkedList<String>();
|
||||||
for (PathComponents current = pathHelper.getComponents(path); ; current = pathHelper
|
for (PathComponents current = pathHelper.getComponents(path); ; current = pathHelper
|
||||||
.getComponents(current.getParent())) {
|
.getComponents(current.getParent())) {
|
||||||
final FileAttributes attrs = statExistence(current.getPath());
|
final FileAttributes attrs = statExistence(current.getPath());
|
||||||
|
|||||||
Reference in New Issue
Block a user