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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 22, 2009 at 7:46 PM, Shawn O. Pearce <spearce@xxxxxxxxxxx> wrote:
> Constantine Plotnikov <constantine.plotnikov@xxxxxxxxx> 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.
>
It looks like both gmail and thunderbird both have a problem. I will
look how opera works next time.

> 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.
>
No problem with it. I have left it for the the case if someone
overrides it with @Override annotation. Deprecation would have given a
warning rather then an error on annotation.

Constantine
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]