https://issues.apache.org/bugzilla/show_bug.cgi?id=44494





--- Comment #16 from Suzuki Yuichiro <[EMAIL PROTECTED]>  2008-03-20 19:57:35 
PST ---
(In reply to comment #10)

> Not bad, but I have some problem believing that no longer using bb.getLength()
> as the value for limit (or not using IntermediateInputStream.available() 
> inside
> convert, which is the same) doesn't cause any problems.

Is your problem solved by followings?

bc.getLength() is called // bc in IntermediateInputStream means bb.
at IntermediateInputStream.available()
at StreamDecoder$CharsetSD.inReady()
at StreamDecoder$CharsetSD.implRead(char[], int, int)
at StreamDecoder$CharsetSD(StreamDecoder).read(char[], int, int)
at ReadConvertor(InputStreamReader).read(char[], int, int)
at ReadConvertor.read(char[], int, int)
at B2CConverter.convert(CharChunk, int)
at B2CConverter.convert(ByteChunk, CharChunk, int)
at B2CConverter.convert(ByteChunk, CharChunk, int)
at InputBuffer.realReadChars(char[], int, int)
at CharChunk.substract(char[], int, int)
at InputBuffer.read(char[], int, int)
at CoyoteReader.read

I saw that with debugger.

And, IntermediateInputStream.read ( means bb.subStruct() )
will return -1 if the requested byte stream is in the end.

As one of the possibilities that the problem occurs,
the ReadConvertor object that extends InputStreamReader
is recycled and reused after the underlying input stream returns -1,
though it works with no trouble in my environment.

If it is not guaranteed, we might have to create a new ReadConvertor object
at each request without recycling used object.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to