four changes of suspicious code (connectivity, sc, sw, editeng)
Lionel Elie Mamane
lionel at mamane.lu
Fri May 8 06:29:10 PDT 2015
On Fri, May 08, 2015 at 01:01:40PM +0200, Lionel Elie Mamane wrote:
> On Fri, May 08, 2015 at 10:23:37AM +0200, Stephan Bergmann wrote:
>> One is in connectivity (Lionel, do you happen to know how to trigger that
>> code?):
> I uploaded a trigger case to
> http://people.freedesktop.org/~lmamane/trigger-java_io_Reader::available.odb
> Enable macros and run the macro "Main" in "Module1" in that file.
I tried it, and it doesn't work. In my tests, HSQLDB's
Clob.getCharacterStream().ready() returns true even at end-of-file.
So we might return "1" although we should return "0". Since the
documentation says: "Note: This method offers no information on
whether the EOF has been reached.", I suggest to just let it slide and
be like that: we return 1 even at EOF.
> This whole class is a mess. It confuses the notion of byte and the
> notion of character. In Java, and also in LibreOffice, a character is
> *two* bytes.
> I'm hesitating between:
> 1) "Unimplementing" getCharacterStream in the SDBC<->JDBC driver
> 2) Having it just call getBinaryStream (which uses java_io_InputStream)
> 3) Fixing java_io_Reader to properly handle the bytes <-> character
> conversion, (which is annoying because it will have to do its own
> buffering for when an odd number of bytes is read...).
I took option 3. Pushing soon.
--
Lionel
More information about the LibreOffice
mailing list