git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [JGIT PATCH/RFC] Removed possibility to change stderr for ssh sessions

From
Shawn O. Pearce <spearce@spearce.org>
Date
Apr 22, 2009, 15:46 UTC
Message-ID
<20090422154657.GK23604@spearce.org>
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,
Show 11 quoted lines
> +	 * 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.
Previous: Constantine PlotnikovNext: Constantine Plotnikov
Message 2 of 4 in “Removed possibility to change stderr for ssh sessions”
  1. Removed possibility to change stderr for ssh sessionsConstantine Plotnikov, Apr 21, 2009
  2. Shawn O. PearceApr 22, 2009
  3. Constantine PlotnikovApr 22, 2009
  4. Shawn O. PearceApr 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.