You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by GitBox <gi...@apache.org> on 2022/10/20 19:06:48 UTC
[GitHub] [mina-sshd] tomaswolf opened a new pull request, #255: [SSHD-1303] AbstractClientChannel: use null stream for redirected stderr
tomaswolf opened a new pull request, #255:
URL: https://github.com/apache/mina-sshd/pull/255
If a channel's error stream has been redirected to the output stream, return null streams from getAsyncErr() and getInvertedErr(). Since they are redirected, application code should never see any data on them.
Also document the IoReadFuture better, and change the single implementation of that interface to match. While the future is not done, operations return null or zero. EOF is signaled by getRead() == -1, or getException() returning an EOFException.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] lgoldstein commented on pull request #255: [SSHD-1303] AbstractClientChannel: use null stream for redirected stderr
Posted by GitBox <gi...@apache.org>.
lgoldstein commented on PR #255:
URL: https://github.com/apache/mina-sshd/pull/255#issuecomment-1286753864
>> Then let's delay doing so to that future until a second concrete use case for this comes up
My personal philosophy is that if something is relatively simple, generic enough to be useful then why not make it public.
>> YAGNI
I agree in principle, though it has been my experience that usually you **are** going to need it.
That being said, I have no issue with leaving this code as-is - like I said, I **recommend** it, but do not insist on it...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] tomaswolf merged pull request #255: [SSHD-1303] AbstractClientChannel: use null stream for redirected stderr
Posted by GitBox <gi...@apache.org>.
tomaswolf merged PR #255:
URL: https://github.com/apache/mina-sshd/pull/255
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] tomaswolf commented on a diff in pull request #255: [SSHD-1303] AbstractClientChannel: use null stream for redirected stderr
Posted by GitBox <gi...@apache.org>.
tomaswolf commented on code in PR #255:
URL: https://github.com/apache/mina-sshd/pull/255#discussion_r1001428599
##########
sshd-core/src/main/java/org/apache/sshd/client/channel/AbstractClientChannel.java:
##########
@@ -474,4 +494,48 @@ public Integer getExitStatus() {
public String getExitSignal() {
return exitSignalHolder.get();
}
+
+ private enum NullIoInputStream implements IoInputStream {
Review Comment:
Then let's delay doing so to that future until a _second_ concrete use case for this comes up. [YAGNI](https://martinfowler.com/bliki/Yagni.html). Which basically means "implement features when they're actually needed, not when you think they _might_ be needed."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] lgoldstein commented on a diff in pull request #255: [SSHD-1303] AbstractClientChannel: use null stream for redirected stderr
Posted by GitBox <gi...@apache.org>.
lgoldstein commented on code in PR #255:
URL: https://github.com/apache/mina-sshd/pull/255#discussion_r1001218334
##########
sshd-core/src/main/java/org/apache/sshd/client/channel/AbstractClientChannel.java:
##########
@@ -474,4 +494,48 @@ public Integer getExitStatus() {
public String getExitSignal() {
return exitSignalHolder.get();
}
+
+ private enum NullIoInputStream implements IoInputStream {
Review Comment:
Recommend making this a *public* class in same package as `IoInputStream` or a member of it. Might come useful in the future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org