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

writeUTF on a very long string will write incorrect length

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Duplicate
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: hotspot
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_1

      Description

      Shall we regard it as a bug that if you give a string to writeUTF
      and its UTF length turns out to be > 65535, the writeUTF blithely
      writes UTF data with an incorrect length (truncated to 16 bits)?

      The easiest fix is that if the UTF length turns out to be > 65535,
      then writeuTF should throw a UTFDataFormatException?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mr Mark Reinhold
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: