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

Check input values in TextArea.replaceRange and TextArea.insert

    Details

    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_95, windows_98

      Description

      Currently, the replaceRange() and insert() methods in TextArea.java
      do not check the values of their input parameters to see if they are
      valid or not (e.g., if text == null, if start < 0, if end < 0, if
      end < start). These checks should be made to avoid errors or
      undefined behavior.

      Note: Check the current (undocumented and possibly platform-dependent)
      behavior for Solaris and Windows, and see what Exceptions are thrown,
      decide if they should be documented, consider whether API or spec
      changes are necessary, etc.



      Name: krT82822 Date: 03/04/2000


      java version "1.2.2"
      Classic VM (build JDK-1.2.2-001, native threads, symcjit)


      In replaceRange method of the class TextArea , if arguments start & end are same then this method goes and replaces start + 1 th character instead of the start character.
      (Review ID: 102068)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arapte Ambarish Rapte
                Reporter:
                ehawkessunw Eric Hawkes (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: