[
https://issues.apache.org/jira/browse/SSHD-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165343#comment-17165343
]
David Ostrovsky edited comment on SSHD-1043 at 7/26/20, 9:26 PM:
-----------------------------------------------------------------
{quote}I believe I fixed the semantics as per the expected - give it a try
{quote}
Confirmed, works as expected on ssd@HEAD:
{code:bash}
$ bazel test org.eclipse.jgit.ssh.apache.test/...
INFO: Invocation ID: 224ef0e8-533b-466f-937a-03a7c2978e3b
DEBUG:
/home/davido/.cache/bazel/_bazel_davido/e1ee1c2b4d81e57e5c4b6fbb219eece8/external/bazel_skylib/lib/versions.bzl:96:18:
Current Bazel is not a release version; cannot check for compatibility. Make
sure that you are running at least Bazel 3.1.0.
INFO: Analyzed target //org.eclipse.jgit.ssh.apache.test:sshd_apache (18
packages loaded, 50 targets configured).
INFO: Found 1 test target...
Target //org.eclipse.jgit.ssh.apache.test:sshd_apache up-to-date:
bazel-bin/org.eclipse.jgit.ssh.apache.test/sshd_apache.jar
bazel-bin/org.eclipse.jgit.ssh.apache.test/sshd_apache
INFO: Elapsed time: 58.370s, Critical Path: 56.65s
INFO: 12 processes: 1 remote cache hit, 7 linux-sandbox, 4 worker.
INFO: Build completed successfully, 13 total actions
//org.eclipse.jgit.ssh.apache.test:sshd_apache PASSED in 51.3s
INFO: Build completed successfully, 13 total actions
{code}
Thanks again for your help!
was (Author: davido2):
{quote}
I believe I fixed the semantics as per the expected - give it a try
{quote}
Confirmed, works as expected on ssh@HEAD:
{code:bash}
$ bazel test org.eclipse.jgit.ssh.apache.test/...
INFO: Invocation ID: 224ef0e8-533b-466f-937a-03a7c2978e3b
DEBUG:
/home/davido/.cache/bazel/_bazel_davido/e1ee1c2b4d81e57e5c4b6fbb219eece8/external/bazel_skylib/lib/versions.bzl:96:18:
Current Bazel is not a release version; cannot check for compatibility. Make
sure that you are running at least Bazel 3.1.0.
INFO: Analyzed target //org.eclipse.jgit.ssh.apache.test:sshd_apache (18
packages loaded, 50 targets configured).
INFO: Found 1 test target...
Target //org.eclipse.jgit.ssh.apache.test:sshd_apache up-to-date:
bazel-bin/org.eclipse.jgit.ssh.apache.test/sshd_apache.jar
bazel-bin/org.eclipse.jgit.ssh.apache.test/sshd_apache
INFO: Elapsed time: 58.370s, Critical Path: 56.65s
INFO: 12 processes: 1 remote cache hit, 7 linux-sandbox, 4 worker.
INFO: Build completed successfully, 13 total actions
//org.eclipse.jgit.ssh.apache.test:sshd_apache PASSED in 51.3s
INFO: Build completed successfully, 13 total actions
{code}
Thanks again for your help!
> Property: Simplify overwriting of default value
> -----------------------------------------------
>
> Key: SSHD-1043
> URL: https://issues.apache.org/jira/browse/SSHD-1043
> Project: MINA SSHD
> Issue Type: New Feature
> Affects Versions: 2.6.0
> Reporter: David Ostrovsky
> Assignee: Lyor Goldstein
> Priority: Minor
> Fix For: 2.6.0
>
>
> Currently, to overwrite default value is somewhat complicated, e.g.:
>
> {code:java}
> /**
> * Default setting for the maximum number of bytes to read in the initial
> * protocol version exchange. 64kb is what OpenSSH < 8.0 read; OpenSSH 8.0
> * changed it to 8Mb, but that seems excessive for the purpose stated in RFC
> * 4253. The Apache MINA sshd default in
> * \{@link FactoryManager#DEFAULT_MAX_IDENTIFICATION_SIZE} is 16kb.
> */
> private static final int DEFAULT_MAX_IDENTIFICATION_SIZE = 64 * 1024;
> // Overwrite default:
> int maxIdentSize;
> Integer maxIdentSizeCustom = MAX_IDENTIFICATION_SIZE.getOrNull(this);
> if (maxIdentSizeCustom == null) maxIdentSize =
> DEFAULT_MAX_IDENTIFICATION_SIZE;
> else maxIdentSize = maxIdentSizeCustom.intValue();
> {code}
>
> I think, it could be simplified if new method `getOrCustomDefault` would be
> provided:
>
> {code:java}
> int maxIdentSize = MAX_IDENTIFICATION_SIZE.getOrCustomDefault(
> this, DEFAULT_MAX_IDENTIFICATION_SIZE);
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]