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

REGRESSION: Allow unlimited number of edits in an UndoManager

XMLWordPrintable

    • beta
    • x86
    • windows_2000

        Name: jl125535 Date: 02/10/2004


        A DESCRIPTION OF THE REQUEST :
        In JDK 1.4, you could specify that an UndoManager had no limit for the number of undos it could hold by setting the limit to 0. This acted as though there was no limit. The fix for bug 4706533 eliminates this capability and zero now means that it cannot hold any edits.

        I want to maintain the ability to have no limit on the number of edits (except for the maximum size of the Vector). I thought I could do that by using setLimit( -1 ), but that doesn't work because it will try to allocate a Vector of size -1. Setting limit to some extremely large value is not an acceptable solution because discardAllEdits will allocate a Vector that big.

        I would like setLimit with a negative number to eliminate the limit and dynamically resize as big as needed. The only change in the class needed to support this is to add a check in discardAllEdits to check for limit < 0 and if so create a vector of default size instead of limit size.



        JUSTIFICATION :
        There needs to be a way to not limit the number edits that can be contained in an UndoManager without requiring the allocation of a large Vector.


        CUSTOMER SUBMITTED WORKAROUND :
        Creat my own version of UndoManager

        Release Regression From : 1.4.2
        The above release value was the last known release where this
        bug was known to work. Since then there has been a regression.

        (Incident Review ID: 237763)
        ======================================================================

              apikalev Andrey Pikalev
              jleesunw Jon Lee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: