You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey A. Ivanov (JIRA)" <ji...@apache.org> on 2006/12/12 15:36:30 UTC
[jira] Created: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
[classlib][swing] j.s.undo.UndoManager.edits has different capacity
-------------------------------------------------------------------
Key: HARMONY-2649
URL: http://issues.apache.org/jira/browse/HARMONY-2649
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Alexey A. Ivanov
Priority: Minor
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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2649?page=comments#action_12457743 ]
Alexey A. Ivanov commented on HARMONY-2649:
-------------------------------------------
The default limit for UndoManager is 100, and it should ensure the underlying Vector has its capacity set to 100.
> [classlib][swing] j.s.undo.UndoManager.edits has different capacity
> -------------------------------------------------------------------
>
> Key: HARMONY-2649
> URL: http://issues.apache.org/jira/browse/HARMONY-2649
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov closed HARMONY-2649.
-------------------------------------
> [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: H2649-tests.patch, HARMONY-2649.patch, test.java
>
>
> 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.
[jira] Commented: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521028 ]
Alexey A. Ivanov commented on HARMONY-2649:
-------------------------------------------
Ilya,
Please not tabs, set up your IDE to use spaces instead of tabs.
> [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: H2649-tests.patch, HARMONY-2649.patch, test.java
>
>
> 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.
[jira] Commented: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "ilya ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520227 ]
ilya ivanov commented on HARMONY-2649:
--------------------------------------
Shall i upload patch?
> [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.
[jira] Updated: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko updated HARMONY-2649:
-------------------------------------
Attachment: (was: Harmony-2649.patch)
> [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, test.java
>
>
> 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.
[jira] Resolved: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov resolved HARMONY-2649.
---------------------------------------
Resolution: Fixed
Patches were applied
> [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: H2649-tests.patch, HARMONY-2649.patch, test.java
>
>
> 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.
[jira] Commented: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "ilya ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520185 ]
ilya ivanov commented on HARMONY-2649:
--------------------------------------
You're right, my apologies. I'll check it through more carefully
> [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.
[jira] Updated: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "ilya ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ilya ivanov updated HARMONY-2649:
---------------------------------
Attachment: HARMONY-2649.patch
> [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, Harmony-2649.patch, Harmony-2649.patch, test.java
>
>
> 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.
[jira] Commented: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520226 ]
Alexey A. Ivanov commented on HARMONY-2649:
-------------------------------------------
I think this is the right resolution.
> [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.
[jira] Updated: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov updated HARMONY-2649:
--------------------------------------
Attachment: H2649-tests.patch
Regression tests
> [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: H2649-tests.patch, HARMONY-2649.patch, test.java
>
>
> 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.
[jira] Assigned: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov reassigned HARMONY-2649:
-----------------------------------------
Assignee: Alexey A. Ivanov
> [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.
[jira] Updated: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "ilya ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ilya ivanov updated HARMONY-2649:
---------------------------------
Attachment: test.java
> [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, Harmony-2649.patch, Harmony-2649.patch, test.java
>
>
> 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.
[jira] Commented: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "ilya ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520225 ]
ilya ivanov commented on HARMONY-2649:
--------------------------------------
Alexey,
i've just added "edits.ensureCapacity(limit);" into UndoManager() constructor and it seems work.
I won't upload patch 'till you reply
> [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.
[jira] Commented: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520228 ]
Alexey A. Ivanov commented on HARMONY-2649:
-------------------------------------------
I guess yes and the patch for tests
> [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.
[jira] Updated: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "ilya ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ilya ivanov updated HARMONY-2649:
---------------------------------
Attachment: Harmony-2649.patch
In attached file patch wich add "edits.ensureCapacity(limit);" into UndoManager() constructor
> [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, 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.
[jira] Updated: (HARMONY-2649) [classlib][swing]
j.s.undo.UndoManager.edits has different capacity
Posted by "ilya ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ilya ivanov updated HARMONY-2649:
---------------------------------
Attachment: Harmony-2649.patch
Attached file changes capacity constant from 10 to 100 in vector.java file.
> [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
> 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.