git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Constantine Plotnikov <constantine.plotnikov@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [JGIT PATCH/RFC] Removed possibility to change stderr for ssh sessions
Date: Wed, 22 Apr 2009 08:46:57 -0700	[thread overview]
Message-ID: <20090422154657.GK23604@spearce.org> (raw)
In-Reply-To: <85647ef50904211149lc4a4902h554c973017d87adb@mail.gmail.com>

Constantine Plotnikov <constantine.plotnikov@gmail.com> wrote:
> The current implementation allowed to change stderr for the
> ssh sessions. However this functionality is broken.

Good catch.

I applied this, but two comments.

One, your patch was line wrapped, I had to manually unwrap it
to apply.  So your MUA is still not able to send patches right.
Thought you'd like to know.

Two,

> +	 * The method does not have to be implemented and will be removed in
> future versions.
>  	 *
>  	 * @return an OutputStream to receive the SSH error stream.
>  	 */
> -	public abstract OutputStream getErrorStream();
> +	@Deprecated
> +	public OutputStream getErrorStream() {
> +		throw new UnsupportedOperationException("This method should not be called.");
> +	}
>  }

I think deprecation here is silly.  I just deleted the method.

Nobody should be calling this except TransportGitSsh, as you
discovered.

If they are, getting UnsupportedOperationException at runtime is
as bad as NoSuchMethodError at runtime, and either is a lot less
friendly than a no such method error at compile time.

Given the method is being broken, I'd rather just remove it outright.
So I removed it from your patch when I applied it.

-- 
Shawn.

  reply	other threads:[~2009-04-22 15:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-21 18:49 [JGIT PATCH/RFC] Removed possibility to change stderr for ssh sessions Constantine Plotnikov
2009-04-22 15:46 ` Shawn O. Pearce [this message]
2009-04-22 15:55   ` Constantine Plotnikov
2009-04-22 15:58     ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090422154657.GK23604@spearce.org \
    --to=spearce@spearce.org \
    --cc=constantine.plotnikov@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).