harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey A. Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2649) [classlib][swing] j.s.undo.UndoManager.edits has different capacity
Date Thu, 16 Aug 2007 07:31:30 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520163
] 

Alexey A. Ivanov commented on HARMONY-2649:
-------------------------------------------

Ilya,

Have you written other tests before just changing the default capacity of Vector?!

Modify the example provided in the following way:

    public static void main(String[] args) {
        System.out.println(new UM().getEditsCapacity());
        System.out.println(new Vector<Object>().capacity());
        System.out.println(new CompoundEdit() {
            public int capacity() {
                return edits.capacity();
            }
        }.capacity());
    }

Then on RI, you'll get the following output:
100
10
10

Which means that your patch is incorrect!

> [classlib][swing] j.s.undo.UndoManager.edits has different capacity
> -------------------------------------------------------------------
>
>                 Key: HARMONY-2649
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2649
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexey A. Ivanov
>            Assignee: Alexey A. Ivanov
>            Priority: Minor
>         Attachments: Harmony-2649.patch
>
>
> import javax.swing.undo.UndoManager;
> public class Test {
>     private static class UM extends UndoManager {
>         public int getEditsCapacity() {
>             return edits.capacity();
>         }
>     }
>     
>     public static void main(String[] args) {
>         System.out.println(new UM().getEditsCapacity());
>     }
> }
> Harmony outputs: 10.
> RI outputs: 100.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message