Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4131647

UTF* internal conversion bug: Output buffer too small

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.5, 1.2.0
    • core-libs
    • generic
    • generic

      java.io.CharConversionException: Output buffer too small
              at java.io.OutputStreamWriter.write(OutputStreamWriter.java)
              at java.io.Writer.write(Writer.java)
              at gen.main(gen.java:29)

      See the enclosed "gen.java" file ... run it a few times (it generates
      data randomly -- collect the seeds to find one that generates the error,
      then reuse that if you like):

      java gen filename.xml UTF8

      Before very long you'll get an exception like the one reported above. This
      is clearly a bug in the implementation, since it has no business failing to
      allocate sufficient space for a character in its internal buffer! (Also,
      note that at some point I started getting error reports with the surrogate
      generation code, and don't know what changed to make them happen. The bug
      shows up either way, although more often when surrogates are used I think.)

      You'll note that java.io.OutputStreamWriter only reports this when it gets
      a ConversionBufferFull exception. I think that it may be interpreting
      the exception incorrectly ... the fact that it's full doesn't mean that
      no characters were written.

            bgomessunw Benedict Gomes (Inactive)
            dbrownelsunw David Brownell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: