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/15 13:00:21 UTC
[jira] Created: (HARMONY-2744) [classlib][swing]
j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than
BadLocationException
[classlib][swing] j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than BadLocationException
-----------------------------------------------------------------------------------------------------------------
Key: HARMONY-2744
URL: http://issues.apache.org/jira/browse/HARMONY-2744
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Alexey A. Ivanov
javax.swing.text.Utilities.getNextWord(JTextComponent, int) throws IllegalArgumentException where RI throws BadLocationException.
To reproduce, use the following code:
Utilities.getNextWord(new JEditorPane("text/plain", ""), 0);
------- Harmony -------
java.lang.IllegalArgumentException
at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
------- end -------
------- RI -------
javax.swing.text.BadLocationException: No more words
at javax.swing.text.Utilities.getNextWordInParagraph(Utilities.java:524)
at javax.swing.text.Utilities.getNextWord(Utilities.java:498)
------- end -------
--
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-2744) [classlib][swing]
j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than
BadLocationException
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465185 ]
Alexey A. Ivanov commented on HARMONY-2744:
-------------------------------------------
Mark, have you removed UtilitiesTest from the exclude list?
Please also note that the fix resides in the AWT module, see comment in HARMONY-2745 for more details.
> [classlib][swing] j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than BadLocationException
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2744
> URL: https://issues.apache.org/jira/browse/HARMONY-2744
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Attachments: H2744-j.s.text.UtilitiesTest.patch, H2744-o.a.h.awt.text.TextUtils.patch
>
>
> javax.swing.text.Utilities.getNextWord(JTextComponent, int) throws IllegalArgumentException where RI throws BadLocationException.
> To reproduce, use the following code:
> Utilities.getNextWord(new JEditorPane("text/plain", ""), 0);
> ------- Harmony -------
> java.lang.IllegalArgumentException
> at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
> at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
> at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
> ------- end -------
> ------- RI -------
> javax.swing.text.BadLocationException: No more words
> at javax.swing.text.Utilities.getNextWordInParagraph(Utilities.java:524)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:498)
> ------- end -------
--
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-2744) [classlib][swing]
j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than
BadLocationException
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464616 ]
Mark Hindess commented on HARMONY-2744:
---------------------------------------
If I apply the test patch, they all pass. Is the fix still required?
> [classlib][swing] j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than BadLocationException
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2744
> URL: https://issues.apache.org/jira/browse/HARMONY-2744
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Attachments: H2744-j.s.text.UtilitiesTest.patch, H2744-o.a.h.awt.text.TextUtils.patch
>
>
> javax.swing.text.Utilities.getNextWord(JTextComponent, int) throws IllegalArgumentException where RI throws BadLocationException.
> To reproduce, use the following code:
> Utilities.getNextWord(new JEditorPane("text/plain", ""), 0);
> ------- Harmony -------
> java.lang.IllegalArgumentException
> at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
> at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
> at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
> ------- end -------
> ------- RI -------
> javax.swing.text.BadLocationException: No more words
> at javax.swing.text.Utilities.getNextWordInParagraph(Utilities.java:524)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:498)
> ------- end -------
--
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-2744) [classlib][swing]
j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than
BadLocationException
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov closed HARMONY-2744.
-------------------------------------
Everything works now. Thank you, Mark.
> [classlib][swing] j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than BadLocationException
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2744
> URL: https://issues.apache.org/jira/browse/HARMONY-2744
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Mark Hindess
> Attachments: H2744-j.s.text.UtilitiesTest.patch, H2744-o.a.h.awt.text.TextUtils.patch
>
>
> javax.swing.text.Utilities.getNextWord(JTextComponent, int) throws IllegalArgumentException where RI throws BadLocationException.
> To reproduce, use the following code:
> Utilities.getNextWord(new JEditorPane("text/plain", ""), 0);
> ------- Harmony -------
> java.lang.IllegalArgumentException
> at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
> at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
> at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
> ------- end -------
> ------- RI -------
> javax.swing.text.BadLocationException: No more words
> at javax.swing.text.Utilities.getNextWordInParagraph(Utilities.java:524)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:498)
> ------- end -------
--
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-2744) [classlib][swing]
j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than
BadLocationException
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465186 ]
Mark Hindess commented on HARMONY-2744:
---------------------------------------
Ignore me. I know what I did wrong now. Testing and hopefully committing shortly.
> [classlib][swing] j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than BadLocationException
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2744
> URL: https://issues.apache.org/jira/browse/HARMONY-2744
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Attachments: H2744-j.s.text.UtilitiesTest.patch, H2744-o.a.h.awt.text.TextUtils.patch
>
>
> javax.swing.text.Utilities.getNextWord(JTextComponent, int) throws IllegalArgumentException where RI throws BadLocationException.
> To reproduce, use the following code:
> Utilities.getNextWord(new JEditorPane("text/plain", ""), 0);
> ------- Harmony -------
> java.lang.IllegalArgumentException
> at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
> at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
> at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
> ------- end -------
> ------- RI -------
> javax.swing.text.BadLocationException: No more words
> at javax.swing.text.Utilities.getNextWordInParagraph(Utilities.java:524)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:498)
> ------- end -------
--
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-2744) [classlib][swing]
j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than
BadLocationException
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2744?page=all ]
Alexey A. Ivanov updated HARMONY-2744:
--------------------------------------
Attachment: H2744-j.s.text.UtilitiesTest.patch
Regression tests.
> [classlib][swing] j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than BadLocationException
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2744
> URL: http://issues.apache.org/jira/browse/HARMONY-2744
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Attachments: H2744-j.s.text.UtilitiesTest.patch
>
>
> javax.swing.text.Utilities.getNextWord(JTextComponent, int) throws IllegalArgumentException where RI throws BadLocationException.
> To reproduce, use the following code:
> Utilities.getNextWord(new JEditorPane("text/plain", ""), 0);
> ------- Harmony -------
> java.lang.IllegalArgumentException
> at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
> at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
> at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
> ------- end -------
> ------- RI -------
> javax.swing.text.BadLocationException: No more words
> at javax.swing.text.Utilities.getNextWordInParagraph(Utilities.java:524)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:498)
> ------- end -------
--
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-2744) [classlib][swing]
j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than
BadLocationException
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465181 ]
Alexey A. Ivanov commented on HARMONY-2744:
-------------------------------------------
Mark, I still see the the new tests fail without the fix patch (see the stack trace below).
I've tried this at r496644 on Windows XP only this time, but this code should work identically on Linux systems.
TESTROOT
javax.swing.text.UtilitiesTest
testGetNextWord02(javax.swing.text.UtilitiesTest)
java.lang.IllegalArgumentException
at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
at javax.swing.text.UtilitiesTest.testGetNextWord02(UtilitiesTest.java:939)
testGetNextWord03(javax.swing.text.UtilitiesTest)
junit.framework.AssertionFailedError: BadLocationException expected
at junit.framework.Assert.fail(Assert.java:47)
at javax.swing.text.UtilitiesTest.testGetNextWord03(UtilitiesTest.java:951)
testGetNextWord04(javax.swing.text.UtilitiesTest)
junit.framework.AssertionFailedError: BadLocationException expected
at junit.framework.Assert.fail(Assert.java:47)
at javax.swing.text.UtilitiesTest.testGetNextWord04(UtilitiesTest.java:971)
> [classlib][swing] j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than BadLocationException
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2744
> URL: https://issues.apache.org/jira/browse/HARMONY-2744
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Attachments: H2744-j.s.text.UtilitiesTest.patch, H2744-o.a.h.awt.text.TextUtils.patch
>
>
> javax.swing.text.Utilities.getNextWord(JTextComponent, int) throws IllegalArgumentException where RI throws BadLocationException.
> To reproduce, use the following code:
> Utilities.getNextWord(new JEditorPane("text/plain", ""), 0);
> ------- Harmony -------
> java.lang.IllegalArgumentException
> at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
> at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
> at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
> ------- end -------
> ------- RI -------
> javax.swing.text.BadLocationException: No more words
> at javax.swing.text.Utilities.getNextWordInParagraph(Utilities.java:524)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:498)
> ------- end -------
--
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-2744) [classlib][swing]
j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than
BadLocationException
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2744?page=all ]
Alexey A. Ivanov updated HARMONY-2744:
--------------------------------------
Attachment: H2744-o.a.h.awt.text.TextUtils.patch
The fix: modified the conditions where BadLocationException is thrown.
> [classlib][swing] j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than BadLocationException
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2744
> URL: http://issues.apache.org/jira/browse/HARMONY-2744
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Attachments: H2744-j.s.text.UtilitiesTest.patch, H2744-o.a.h.awt.text.TextUtils.patch
>
>
> javax.swing.text.Utilities.getNextWord(JTextComponent, int) throws IllegalArgumentException where RI throws BadLocationException.
> To reproduce, use the following code:
> Utilities.getNextWord(new JEditorPane("text/plain", ""), 0);
> ------- Harmony -------
> java.lang.IllegalArgumentException
> at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
> at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
> at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
> ------- end -------
> ------- RI -------
> javax.swing.text.BadLocationException: No more words
> at javax.swing.text.Utilities.getNextWordInParagraph(Utilities.java:524)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:498)
> ------- end -------
--
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-2744) [classlib][swing]
j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than
BadLocationException
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2744?page=comments#action_12458766 ]
Alexey A. Ivanov commented on HARMONY-2744:
-------------------------------------------
Note that javax.swing.text.UtilitiesTest is in the exclude lists at the moment.
> [classlib][swing] j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than BadLocationException
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2744
> URL: http://issues.apache.org/jira/browse/HARMONY-2744
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Attachments: H2744-j.s.text.UtilitiesTest.patch, H2744-o.a.h.awt.text.TextUtils.patch
>
>
> javax.swing.text.Utilities.getNextWord(JTextComponent, int) throws IllegalArgumentException where RI throws BadLocationException.
> To reproduce, use the following code:
> Utilities.getNextWord(new JEditorPane("text/plain", ""), 0);
> ------- Harmony -------
> java.lang.IllegalArgumentException
> at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
> at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
> at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
> ------- end -------
> ------- RI -------
> javax.swing.text.BadLocationException: No more words
> at javax.swing.text.Utilities.getNextWordInParagraph(Utilities.java:524)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:498)
> ------- end -------
--
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] Resolved: (HARMONY-2744) [classlib][swing]
j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than
BadLocationException
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess resolved HARMONY-2744.
-----------------------------------
Resolution: Fixed
Assignee: Mark Hindess
Applied patches in r496745. Please confirm they have been applied as expected.
> [classlib][swing] j.s.text.Utilities.getNextWord throws IllegalArgumentException rather than BadLocationException
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2744
> URL: https://issues.apache.org/jira/browse/HARMONY-2744
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Mark Hindess
> Attachments: H2744-j.s.text.UtilitiesTest.patch, H2744-o.a.h.awt.text.TextUtils.patch
>
>
> javax.swing.text.Utilities.getNextWord(JTextComponent, int) throws IllegalArgumentException where RI throws BadLocationException.
> To reproduce, use the following code:
> Utilities.getNextWord(new JEditorPane("text/plain", ""), 0);
> ------- Harmony -------
> java.lang.IllegalArgumentException
> at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:71)
> at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:61)
> at org.apache.harmony.awt.text.TextUtils.getNextWord(TextUtils.java:144)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:49)
> ------- end -------
> ------- RI -------
> javax.swing.text.BadLocationException: No more words
> at javax.swing.text.Utilities.getNextWordInParagraph(Utilities.java:524)
> at javax.swing.text.Utilities.getNextWord(Utilities.java:498)
> ------- end -------
--
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