harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zhang" <zhanghuang...@gmail.com>
Subject Re: [classlib][sql] Compatibility issue of SerialBlob.setBinaryStream(long pos)
Date Thu, 11 Jan 2007 07:42:08 GMT
Thanks guys!

HARMONY-2971 was filed to record this non bug difference from RI.

On 1/10/07, Alexei Zakharov <alexei.zakharov@gmail.com> wrote:
>
> > "If this SerialBlob is instantiated with a byte array, a SerialException
> > is thrown."
> > So I say throw the SerialException.
>
> +1 from me.
>
> Regards,
>
> 2007/1/8, Tim Ellison <t.p.ellison@gmail.com>:
> > The main JavaDoc description seems quite clear to me:
> > "If this SerialBlob is instantiated with a byte array, a SerialException
> > is thrown."
> >
> > So I say throw the SerialException.
> >
> > Regards,
> > Tim
> >
> > Andrew Zhang wrote:
> > > Hi guys,
> > >
> > > sorry, SerialBlob compatibility problem again. It's the last
> unimplemented
> > > method of SerialBlob, setBinaryStream(long pos). The spec says "throws
> > > SerialException - if the SerialBlob in not instantiated with a Blob
> object
> > > that supports setBinaryStream()".  What should happen if the
> SerialBlob is
> > > instantiated with a byte buffer? As my understanding, it should throw
> > > SerialException, but I feel the spec is a little ambiguous, is it? I
> need
> > > native speakers' help. :-) Anyway, I think throws SerialException
> sounds
> > > reasonable to me if it's instantiated with a byte buffer. But RI
> throws
> > > NullPointerException instead. Following test shows the problem:
> > > public void testSetBinaryStreamJ() throws Exception {
> > >        byte[] buf = { 1, 2, 3, 4, 5, 6, 7, 8 };
> > >        SerialBlob serialBlob = new SerialBlob(buf);
> > >        serialBlob.setBinaryStream(1);
> > >    }
> > > Shall we follow RI or throw SerialException? Thanks!
>
>
> --
> Alexei Zakharov,
> Intel ESSD
>



-- 
Best regards,
Andrew Zhang

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message