You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Shawn Pearce <so...@google.com> on 2009/12/15 15:56:00 UTC

Re: svn commit: r890631 - in /mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd: client/auth/ client/channel/ client/kex/ client/session/ common/ common/channel/ common/session/ server/auth/ server/channel/ server/session/

Guillaume Nodet <gn...@gmail.com> wrote:
> I wonder if we should add back the createBuffer method with a single
> argument that would call createBuffer(cmd, 0) for readability...

I thought about doing that when I wrote the change... but since
Session is an interface I wasn't too thrilled about exposing two
different createBuffer methods in it.

Its easy enough for me to change though, I can back out most of
the patch and add the createBuffer(int) signature if that's what
you'd prefer.
 
> On Tue, Dec 15, 2009 at 04:56,  <sp...@apache.org> wrote:
> > Author: spearce
> > Date: Tue Dec 15 03:56:32 2009
> > New Revision: 890631
...
> > Unfortunately most uses of createBuffer don't care about the size
> > of the buffer, as they are one-shot requests which are often within
> > the default size of 512 bytes.  Pass in 0 for these and allow them
> > to use the default 512 byte size.

Re: svn commit: r890631 - in /mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd: client/auth/ client/channel/ client/kex/ client/session/ common/ common/channel/ common/session/ server/auth/ server/channel/ server/session/

Posted by Guillaume Nodet <gn...@gmail.com>.
Yeah, it's true that having multiple overrides of the same method in
an interface does not really help the use of the interface ...

On Tue, Dec 15, 2009 at 15:56, Shawn Pearce <so...@google.com> wrote:
> Guillaume Nodet <gn...@gmail.com> wrote:
>> I wonder if we should add back the createBuffer method with a single
>> argument that would call createBuffer(cmd, 0) for readability...
>
> I thought about doing that when I wrote the change... but since
> Session is an interface I wasn't too thrilled about exposing two
> different createBuffer methods in it.
>
> Its easy enough for me to change though, I can back out most of
> the patch and add the createBuffer(int) signature if that's what
> you'd prefer.
>
>> On Tue, Dec 15, 2009 at 04:56,  <sp...@apache.org> wrote:
>> > Author: spearce
>> > Date: Tue Dec 15 03:56:32 2009
>> > New Revision: 890631
> ...
>> > Unfortunately most uses of createBuffer don't care about the size
>> > of the buffer, as they are one-shot requests which are often within
>> > the default size of 512 bytes.  Pass in 0 for these and allow them
>> > to use the default 512 byte size.
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com