From 95ea0407683f5f6a62b4fe41f330ab319cbb5f58 Mon Sep 17 00:00:00 2001 From: Shikhar Bhushan Date: Sat, 6 Mar 2010 01:19:43 +0100 Subject: [PATCH] license headers and other minor cleanups --- .../net/schmizz/sshj/common/SSHException.java | 14 +++-------- .../sshj/connection/ConnectionException.java | 4 ---- .../connection/channel/AbstractChannel.java | 4 ++-- .../channel/direct/AbstractDirectChannel.java | 4 ++-- .../channel/direct/LocalPortForwarder.java | 2 +- .../channel/direct/SessionChannel.java | 2 +- .../forwarded/AbstractForwardedChannel.java | 4 ++-- .../forwarded/RemotePortForwarder.java | 2 +- .../channel/forwarded/X11Forwarder.java | 2 +- .../net/schmizz/sshj/sftp/SFTPException.java | 4 ---- .../sshj/transport/TransportException.java | 4 ---- .../net/schmizz/sshj/userauth/AuthParams.java | 20 ---------------- .../net/schmizz/sshj/userauth/UserAuth.java | 20 ---------------- .../sshj/userauth/UserAuthException.java | 24 ------------------- .../userauth/method/AbstractAuthMethod.java | 20 ---------------- .../sshj/userauth/method/AuthHostbased.java | 20 ---------------- .../sshj/userauth/method/AuthMethod.java | 20 ---------------- .../sshj/userauth/method/AuthNone.java | 20 ---------------- .../sshj/userauth/method/AuthPassword.java | 20 ---------------- .../sshj/userauth/method/AuthPublickey.java | 20 ---------------- .../sshj/userauth/method/KeyedAuthMethod.java | 20 ---------------- .../sshj/userauth/password/PasswordUtils.java | 13 ---------- 22 files changed, 13 insertions(+), 250 deletions(-) diff --git a/src/main/java/net/schmizz/sshj/common/SSHException.java b/src/main/java/net/schmizz/sshj/common/SSHException.java index f398cb73..f000daae 100644 --- a/src/main/java/net/schmizz/sshj/common/SSHException.java +++ b/src/main/java/net/schmizz/sshj/common/SSHException.java @@ -40,8 +40,8 @@ import net.schmizz.concurrent.ExceptionChainer; import java.io.IOException; /** - * Most exceptions in {@code org.apache.commons.net.ssh} are instances of this class. An {@link SSHException} is itself - * an {@link IOException} and can be caught like that if this level of granularity is not desired. + * Most exceptions in the {@code net.schmizz.sshj} package are instances of this class. An {@link SSHException} is + * itself an {@link IOException} and can be caught like that if this level of granularity is not desired. */ public class SSHException extends IOException { @@ -59,10 +59,6 @@ public class SSHException private final DisconnectReason reason; - public SSHException() { - this(DisconnectReason.UNKNOWN, null, null); - } - public SSHException(DisconnectReason code) { this(code, null, null); } @@ -94,10 +90,6 @@ public class SSHException this(DisconnectReason.UNKNOWN, null, cause); } - public int getDisconnectCode() { - return reason.toInt(); - } - public DisconnectReason getDisconnectReason() { return reason; } @@ -117,7 +109,7 @@ public class SSHException final String cls = getClass().getName(); final String code = reason != DisconnectReason.UNKNOWN ? "[" + reason + "] " : ""; final String msg = getMessage() != null ? getMessage() : ""; - return cls + (code.equals("") && msg.equals("") ? "" : ": ") + code + msg; + return cls + (code.isEmpty() && msg.isEmpty() ? "" : ": ") + code + msg; } } diff --git a/src/main/java/net/schmizz/sshj/connection/ConnectionException.java b/src/main/java/net/schmizz/sshj/connection/ConnectionException.java index c273d001..4543cde3 100644 --- a/src/main/java/net/schmizz/sshj/connection/ConnectionException.java +++ b/src/main/java/net/schmizz/sshj/connection/ConnectionException.java @@ -32,10 +32,6 @@ public class ConnectionException } }; - public ConnectionException() { - super(); - } - public ConnectionException(DisconnectReason code) { super(code); } diff --git a/src/main/java/net/schmizz/sshj/connection/channel/AbstractChannel.java b/src/main/java/net/schmizz/sshj/connection/channel/AbstractChannel.java index 6fa12e5a..f13b6814 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/AbstractChannel.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/AbstractChannel.java @@ -102,9 +102,9 @@ public abstract class AbstractChannel private volatile boolean autoExpand = false; - protected AbstractChannel(String type, Connection conn) { - this.type = type; + protected AbstractChannel(Connection conn, String type) { this.conn = conn; + this.type = type; this.trans = conn.getTransport(); id = conn.nextID(); diff --git a/src/main/java/net/schmizz/sshj/connection/channel/direct/AbstractDirectChannel.java b/src/main/java/net/schmizz/sshj/connection/channel/direct/AbstractDirectChannel.java index 2fa75caf..b1ff22b2 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/direct/AbstractDirectChannel.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/direct/AbstractDirectChannel.java @@ -51,8 +51,8 @@ public abstract class AbstractDirectChannel extends AbstractChannel implements Channel.Direct { - protected AbstractDirectChannel(String name, Connection conn) { - super(name, conn); + protected AbstractDirectChannel(Connection conn, String type) { + super(conn, type); /* * We expect to receive channel open confirmation/rejection and want to be able to next this packet. diff --git a/src/main/java/net/schmizz/sshj/connection/channel/direct/LocalPortForwarder.java b/src/main/java/net/schmizz/sshj/connection/channel/direct/LocalPortForwarder.java index 77aab227..3b115d64 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/direct/LocalPortForwarder.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/direct/LocalPortForwarder.java @@ -37,7 +37,7 @@ public class LocalPortForwarder { private final Socket sock; private DirectTCPIPChannel(Connection conn, Socket sock) { - super("direct-tcpip", conn); + super(conn, "direct-tcpip"); this.sock = sock; } diff --git a/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java b/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java index 4ce477f0..11035751 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java @@ -67,7 +67,7 @@ public class private ChannelInputStream err = new ChannelInputStream(this, trans, lwin); public SessionChannel(Connection conn) { - super("session", conn); + super(conn, "session"); } public void allocateDefaultPTY() diff --git a/src/main/java/net/schmizz/sshj/connection/channel/forwarded/AbstractForwardedChannel.java b/src/main/java/net/schmizz/sshj/connection/channel/forwarded/AbstractForwardedChannel.java index cd925ab3..e3342e55 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/forwarded/AbstractForwardedChannel.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/forwarded/AbstractForwardedChannel.java @@ -54,9 +54,9 @@ public abstract class AbstractForwardedChannel * First 2 args are standard; the others can be parsed from a CHANNEL_OPEN packet. */ - protected AbstractForwardedChannel(String type, Connection conn, int recipient, int remoteWinSize, + protected AbstractForwardedChannel(Connection conn, String type, int recipient, int remoteWinSize, int remoteMaxPacketSize, String origIP, int origPort) { - super(type, conn); + super(conn, type); this.origIP = origIP; this.origPort = origPort; init(recipient, remoteWinSize, remoteMaxPacketSize); diff --git a/src/main/java/net/schmizz/sshj/connection/channel/forwarded/RemotePortForwarder.java b/src/main/java/net/schmizz/sshj/connection/channel/forwarded/RemotePortForwarder.java index 3d65592b..9e9bac5f 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/forwarded/RemotePortForwarder.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/forwarded/RemotePortForwarder.java @@ -130,7 +130,7 @@ public class RemotePortForwarder public ForwardedTCPIPChannel(Connection conn, int recipient, int remoteWinSize, int remoteMaxPacketSize, Forward fwd, String origIP, int origPort) throws TransportException { - super(TYPE, conn, recipient, remoteWinSize, remoteMaxPacketSize, origIP, origPort); + super(conn, TYPE, recipient, remoteWinSize, remoteMaxPacketSize, origIP, origPort); this.fwd = fwd; } diff --git a/src/main/java/net/schmizz/sshj/connection/channel/forwarded/X11Forwarder.java b/src/main/java/net/schmizz/sshj/connection/channel/forwarded/X11Forwarder.java index ceb8ec33..a4939511 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/forwarded/X11Forwarder.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/forwarded/X11Forwarder.java @@ -35,7 +35,7 @@ public class X11Forwarder public X11Channel(Connection conn, int recipient, int remoteWinSize, int remoteMaxPacketSize, String origIP, int origPort) { - super(TYPE, conn, recipient, remoteWinSize, remoteMaxPacketSize, origIP, origPort); + super(conn, TYPE, recipient, remoteWinSize, remoteMaxPacketSize, origIP, origPort); } } diff --git a/src/main/java/net/schmizz/sshj/sftp/SFTPException.java b/src/main/java/net/schmizz/sshj/sftp/SFTPException.java index 423d53ca..7e3b7a6a 100644 --- a/src/main/java/net/schmizz/sshj/sftp/SFTPException.java +++ b/src/main/java/net/schmizz/sshj/sftp/SFTPException.java @@ -34,10 +34,6 @@ public class SFTPException }; - public SFTPException() { - super(); - } - public SFTPException(DisconnectReason code) { super(code); } diff --git a/src/main/java/net/schmizz/sshj/transport/TransportException.java b/src/main/java/net/schmizz/sshj/transport/TransportException.java index ca54cd9b..cb4a7063 100644 --- a/src/main/java/net/schmizz/sshj/transport/TransportException.java +++ b/src/main/java/net/schmizz/sshj/transport/TransportException.java @@ -53,10 +53,6 @@ public class TransportException } }; - public TransportException() { - super(); - } - public TransportException(DisconnectReason code) { super(code); } diff --git a/src/main/java/net/schmizz/sshj/userauth/AuthParams.java b/src/main/java/net/schmizz/sshj/userauth/AuthParams.java index 38f4946b..2ffa5d2f 100644 --- a/src/main/java/net/schmizz/sshj/userauth/AuthParams.java +++ b/src/main/java/net/schmizz/sshj/userauth/AuthParams.java @@ -12,26 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * This file may incorporate work covered by the following copyright and - * permission notice: - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. */ package net.schmizz.sshj.userauth; diff --git a/src/main/java/net/schmizz/sshj/userauth/UserAuth.java b/src/main/java/net/schmizz/sshj/userauth/UserAuth.java index a81225e7..16ff4163 100644 --- a/src/main/java/net/schmizz/sshj/userauth/UserAuth.java +++ b/src/main/java/net/schmizz/sshj/userauth/UserAuth.java @@ -12,26 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * This file may incorporate work covered by the following copyright and - * permission notice: - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. */ package net.schmizz.sshj.userauth; diff --git a/src/main/java/net/schmizz/sshj/userauth/UserAuthException.java b/src/main/java/net/schmizz/sshj/userauth/UserAuthException.java index 543a7764..0797938d 100644 --- a/src/main/java/net/schmizz/sshj/userauth/UserAuthException.java +++ b/src/main/java/net/schmizz/sshj/userauth/UserAuthException.java @@ -12,26 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * This file may incorporate work covered by the following copyright and - * permission notice: - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. */ package net.schmizz.sshj.userauth; @@ -54,10 +34,6 @@ public class UserAuthException }; - public UserAuthException() { - super(); - } - public UserAuthException(DisconnectReason code) { super(code); } diff --git a/src/main/java/net/schmizz/sshj/userauth/method/AbstractAuthMethod.java b/src/main/java/net/schmizz/sshj/userauth/method/AbstractAuthMethod.java index ae56f3e6..cc3bf468 100644 --- a/src/main/java/net/schmizz/sshj/userauth/method/AbstractAuthMethod.java +++ b/src/main/java/net/schmizz/sshj/userauth/method/AbstractAuthMethod.java @@ -12,26 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * This file may incorporate work covered by the following copyright and - * permission notice: - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. */ package net.schmizz.sshj.userauth.method; diff --git a/src/main/java/net/schmizz/sshj/userauth/method/AuthHostbased.java b/src/main/java/net/schmizz/sshj/userauth/method/AuthHostbased.java index a75d3bf4..ccb00ddb 100644 --- a/src/main/java/net/schmizz/sshj/userauth/method/AuthHostbased.java +++ b/src/main/java/net/schmizz/sshj/userauth/method/AuthHostbased.java @@ -12,26 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * This file may incorporate work covered by the following copyright and - * permission notice: - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. */ package net.schmizz.sshj.userauth.method; diff --git a/src/main/java/net/schmizz/sshj/userauth/method/AuthMethod.java b/src/main/java/net/schmizz/sshj/userauth/method/AuthMethod.java index 191d662e..d203ac46 100644 --- a/src/main/java/net/schmizz/sshj/userauth/method/AuthMethod.java +++ b/src/main/java/net/schmizz/sshj/userauth/method/AuthMethod.java @@ -12,26 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * This file may incorporate work covered by the following copyright and - * permission notice: - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. */ package net.schmizz.sshj.userauth.method; diff --git a/src/main/java/net/schmizz/sshj/userauth/method/AuthNone.java b/src/main/java/net/schmizz/sshj/userauth/method/AuthNone.java index dd9396ba..02af7480 100644 --- a/src/main/java/net/schmizz/sshj/userauth/method/AuthNone.java +++ b/src/main/java/net/schmizz/sshj/userauth/method/AuthNone.java @@ -12,26 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * This file may incorporate work covered by the following copyright and - * permission notice: - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. */ package net.schmizz.sshj.userauth.method; diff --git a/src/main/java/net/schmizz/sshj/userauth/method/AuthPassword.java b/src/main/java/net/schmizz/sshj/userauth/method/AuthPassword.java index f22fe946..a8d1d2ba 100644 --- a/src/main/java/net/schmizz/sshj/userauth/method/AuthPassword.java +++ b/src/main/java/net/schmizz/sshj/userauth/method/AuthPassword.java @@ -12,26 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * This file may incorporate work covered by the following copyright and - * permission notice: - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. */ package net.schmizz.sshj.userauth.method; diff --git a/src/main/java/net/schmizz/sshj/userauth/method/AuthPublickey.java b/src/main/java/net/schmizz/sshj/userauth/method/AuthPublickey.java index e02e45be..195ae95a 100644 --- a/src/main/java/net/schmizz/sshj/userauth/method/AuthPublickey.java +++ b/src/main/java/net/schmizz/sshj/userauth/method/AuthPublickey.java @@ -12,26 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * This file may incorporate work covered by the following copyright and - * permission notice: - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. */ package net.schmizz.sshj.userauth.method; diff --git a/src/main/java/net/schmizz/sshj/userauth/method/KeyedAuthMethod.java b/src/main/java/net/schmizz/sshj/userauth/method/KeyedAuthMethod.java index 38b32634..11b41316 100644 --- a/src/main/java/net/schmizz/sshj/userauth/method/KeyedAuthMethod.java +++ b/src/main/java/net/schmizz/sshj/userauth/method/KeyedAuthMethod.java @@ -12,26 +12,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * This file may incorporate work covered by the following copyright and - * permission notice: - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. */ package net.schmizz.sshj.userauth.method; diff --git a/src/main/java/net/schmizz/sshj/userauth/password/PasswordUtils.java b/src/main/java/net/schmizz/sshj/userauth/password/PasswordUtils.java index f8ffbad0..825db16d 100644 --- a/src/main/java/net/schmizz/sshj/userauth/password/PasswordUtils.java +++ b/src/main/java/net/schmizz/sshj/userauth/password/PasswordUtils.java @@ -16,7 +16,6 @@ package net.schmizz.sshj.userauth.password; import java.util.Arrays; -import java.util.Map; /** Static utility method and factories */ public class PasswordUtils { @@ -53,16 +52,4 @@ public class PasswordUtils { }; } - public static PasswordFinder createResourceBased(final Map, String> passwordMap) { - return new PasswordFinder() { - public char[] reqPassword(Resource resource) { - return passwordMap.get(resource).toCharArray(); - } - - public boolean shouldRetry(Resource resource) { - return false; - } - - }; - } }