forked from apache/mina-sshd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved some helper methods and classes to more natural locations
- Loading branch information
Lyor Goldstein
committed
Mar 5, 2021
1 parent
da23f55
commit 73883a5
Showing
118 changed files
with
649 additions
and
523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
import java.util.Map; | ||
import java.util.Objects; | ||
|
||
import org.apache.sshd.common.util.GenericUtils; | ||
import org.apache.sshd.common.util.MapEntryUtils; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a> | ||
|
@@ -111,12 +111,12 @@ public int getAttributesCount() { | |
@SuppressWarnings("unchecked") | ||
public <T> T getAttribute(AttributeKey<T> key) { | ||
Objects.requireNonNull(key, "No key provided"); | ||
return GenericUtils.isEmpty(attributes) ? null : (T) attributes.get(key); | ||
return MapEntryUtils.isEmpty(attributes) ? null : (T) attributes.get(key); | ||
} | ||
|
||
@Override | ||
public Collection<AttributeKey<?>> attributeKeys() { | ||
return GenericUtils.isEmpty(attributes) | ||
return MapEntryUtils.isEmpty(attributes) | ||
? Collections.emptySet() | ||
: new HashSet<>(attributes.keySet()); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
import java.util.concurrent.TimeUnit; | ||
|
||
import org.apache.sshd.common.util.GenericUtils; | ||
import org.apache.sshd.common.util.MapEntryUtils; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a> | ||
|
@@ -159,7 +160,7 @@ public static Map<TimeValueConfig, Long> parse(String s) throws IllegalArgumentE | |
* @throws IllegalArgumentException If negative count for a time unit | ||
*/ | ||
public static long durationOf(Map<TimeValueConfig, ? extends Number> spec) throws IllegalArgumentException { | ||
if (GenericUtils.isEmpty(spec)) { | ||
if (MapEntryUtils.isEmpty(spec)) { | ||
return -1L; | ||
} | ||
|
||
|
Oops, something went wrong.