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/11 16:52:21 UTC
[jira] Created: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
[classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
------------------------------------------------------------------------------------------
Key: HARMONY-2612
URL: http://issues.apache.org/jira/browse/HARMONY-2612
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Alexey A. Ivanov
Priority: Minor
javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
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] Updated: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2612?page=all ]
Alexey A. Ivanov updated HARMONY-2612:
--------------------------------------
Attachment: HTest2612.java
A sample application which demonstrates the problem.
Harmony output:
success
RI output:
java.lang.ArrayIndexOutOfBoundsException: 1 >= 1
at java.util.Vector.elementAt(Vector.java:432)
at javax.swing.undo.UndoManager.redoTo(UndoManager.java:221)
at HTest2612$UM.redoTo(HTest2612.java:22)
at HTest2612.main(HTest2612.java:34)
------------
Maybe it makes sense to throw CannotRedoException with an explanation why. If yes, undoTo() should also be modified.
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: http://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
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] Assigned: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov reassigned HARMONY-2612:
----------------------------------------
Assignee: Alexei Zakharov
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465437 ]
Vasily Zakharov commented on HARMONY-2612:
------------------------------------------
Good ideas, thanks Alexey.
I've updated the test patch.
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469107 ]
Alexei Zakharov commented on HARMONY-2612:
------------------------------------------
It seems throwing CannotUndoException / CannotRedoException is logical here. Moreover, these exceptions are "described" in javadoc for the UndoManager class. So I am +1 here.
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465371 ]
Alexey A. Ivanov commented on HARMONY-2612:
-------------------------------------------
Vasily,
Does it make sense to separate tests for undoTo() and redoTo() methods?
I guess you can safely use AbstractUndoableEdit instead of StateEdit. With this approach you won't need additional classes.
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vasily Zakharov updated HARMONY-2612:
-------------------------------------
Attachment: Harmony-2612-Test.patch
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469380 ]
Alexei Zakharov commented on HARMONY-2612:
------------------------------------------
Vasily or Alexey,
Can someone create new a JIRA in non-bug-diff category about exception throwing differences mentioned above and link it to this JIRA? Thanks!
Alexei
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469278 ]
Vasily Zakharov commented on HARMONY-2612:
------------------------------------------
Thanks Alexei, the patch is fine.
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469537 ]
Vasily Zakharov commented on HARMONY-2612:
------------------------------------------
I've created an NBD JIRA for this issue, HARMONY-3112.
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465232 ]
Vasily Zakharov commented on HARMONY-2612:
------------------------------------------
Attached fix and test patches.
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vasily Zakharov updated HARMONY-2612:
-------------------------------------
Attachment: Harmony-2612-Test.patch
Harmony-2612.patch
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465231 ]
Vasily Zakharov commented on HARMONY-2612:
------------------------------------------
"With an explanation why" won't work here - unfortunately, both CannotUndoException and CannotRedoException only have no-parameter constructors.
Anyway, throwing them looks a good idea.
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov resolved HARMONY-2612.
--------------------------------------
Resolution: Fixed
Thanks guys. The patch was applied at the revision 501905. Please verify it was applied as expected.
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465225 ]
Vasily Zakharov commented on HARMONY-2612:
------------------------------------------
I agree, looks like this is a non-bug diff, and throwing a CannotUndoException/CannotRedoException instead of ArrayIndexOutOfBoundsException is reasonable.
However, throwing an exception is sure necessary in both undoTo() and redoTo() methods.
I'll provide a patch soon.
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov closed HARMONY-2612.
------------------------------------
Verified by Vasiliy
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-2612) [classlib][swing]
j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov updated HARMONY-2612:
-------------------------------------
Patch Info: [Patch Available]
> [classlib][swing] j.s.undo.UndoManager.redoTo doesn't throw ArrayIndexOutOfBoundsException
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-2612
> URL: https://issues.apache.org/jira/browse/HARMONY-2612
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: Harmony-2612-Test.patch, Harmony-2612-Test.patch, Harmony-2612.patch, HTest2612.java
>
>
> javax.swing.undo.UndoManager.redoTo(edit) does not throw ArrayIndexOutOfBoundsException where edit is not found in the list of UndoableEdits, whereas RI throws the exception in this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.