You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Oleg Khaschansky (JIRA)" <ji...@apache.org> on 2006/10/26 12:07:16 UTC

[jira] Created: (HARMONY-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

[classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
--------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-1975
                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
             Project: Harmony
          Issue Type: Sub-task
          Components: Classlib
            Reporter: Oleg Khaschansky


This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1975?page=all ]

Stepan Mishura reassigned HARMONY-1975:
---------------------------------------

    Assignee: Stepan Mishura

> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Assigned To: Stepan Mishura
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1975?page=comments#action_12445075 ] 
            
Stepan Mishura commented on HARMONY-1975:
-----------------------------------------

Hi Oleg, I've applied your patch to SWING module at r468258. But I've excluded update for GapContent.java because it'll change implementation behavior. The spec. is silent about valid values for parameters. So is there any test case that shows what RI does in case of invalid parameters? Does it ignore invalid parameter as your update suggests?

Thanks,
Stepan.

> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Assigned To: Stepan Mishura
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1975?page=comments#action_12445208 ] 
            
Oleg Khaschansky commented on HARMONY-1975:
-------------------------------------------

RI doesn't throw BadLocationException in the modified example also. I think that the behavior for the case with invalid parameters is a subject to another fix (which could be attached to #1809), the suggested patch just fixes the API and it seems to me that it is not harmful to the functionality. Anyway, I'd say that the behavior with the patch is more close to RI then without. I'll link #1809 to this issue.

> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Assigned To: Stepan Mishura
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1975?page=comments#action_12445557 ] 
            
Stepan Mishura commented on HARMONY-1975:
-----------------------------------------

I suggest closing this issues as resolved and fixing GapContent.replace() in HARMONY-1809

> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Assigned To: Stepan Mishura
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1975?page=all ]

Stepan Mishura closed HARMONY-1975.
-----------------------------------

    Resolution: Fixed

Verified by Oleg.

> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Assigned To: Stepan Mishura
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1975?page=comments#action_12445559 ] 
            
Oleg Khaschansky commented on HARMONY-1975:
-------------------------------------------

Ok.

> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Assigned To: Stepan Mishura
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1975?page=comments#action_12445160 ] 
            
Alexey A. Ivanov commented on HARMONY-1975:
-------------------------------------------

About GapContent modification: It's not that simple as it seems.

Consider the following modified example (only the main method, other code is unchanged):
-------------------------------------------------------
    public static void main(String[] args) throws Exception {
        MyGC gc = new MyGC();
        gc.insertString(0, "text");
        System.err.println("'" + gc.getString(0, gc.length()) + "'");
        gc.callReplace(-3, 3, null, 0);
        System.err.println("'" + gc.getString(0, gc.length()) + "'");
    }
-------------------------------------------------------

When running on Harmony without the fix to GapContent, we get:
'text
'
javax.swing.text.BadLocationException: Invalid remove position
	at javax.swing.text.GapContent.removeItems(GapContent.java:390)
	at javax.swing.text.GapContent.replace(GapContent.java:243)
	at HTest1975$MyGC.callReplace(HTest1975.java:16)
	at HTest1975.main(HTest1975.java:9)
'text
'
=======

When running on Harmony with the fix:
'text
'
'text
'
=======

When running on RI (JRockit 1.5):
'text
'
't
'
=======

As you can see, the RI peforms operation on *invalid* values. Should we follow its behaviour (yet to be determined more accurately)?

> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Assigned To: Stepan Mishura
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1975?page=all ]

Oleg Khaschansky updated HARMONY-1975:
--------------------------------------

    Attachment: harmony-1975.patch

Patch at rev. 467585

> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1975?page=comments#action_12445570 ] 
            
Alexey A. Ivanov commented on HARMONY-1975:
-------------------------------------------

I support the suggestion to close this issue, and to fix GapContent.replace() as HARMONY-1809.

> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Assigned To: Stepan Mishura
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1975?page=comments#action_12445162 ] 
            
Alexey A. Ivanov commented on HARMONY-1975:
-------------------------------------------

There's a separate JIRA issue about GapContent.replace(): HARMONY-1809

> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Assigned To: Stepan Mishura
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.

Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1975?page=comments#action_12445135 ] 
            
Oleg Khaschansky commented on HARMONY-1975:
-------------------------------------------

This modification was based on the following JAPI message:
method javax.swing.text.GapContent.replace(int, int, java.lang.Object, int): doesn't throw javax.swing.text.BadLocationException in jdk15, but throws javax.swing.text.BadLocationException in harmony

I thought that GapContent modification is so minor that is doesn't require a test case. Actually, if you look into GapContentEdit.insertItems and GapContentEdit.removeItems - they do the same already. The following test case shows the difference between RI behavior and Harmony:
-----------------------------------------------------------------------
import javax.swing.text.GapContent;

public class test{

    public static void main(String[] args) {
        MyGC gc = new MyGC();
        gc.callReplace(-3, 0, null, 0);
    }

    public static class MyGC extends GapContent {
        public void callReplace(int pos, int rmSize, Object addItems, int addSize) {
            try {
                this.replace(pos, rmSize, addItems, addSize);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
-----------------------------------------------------------------------



> [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1975
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1975
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>         Assigned To: Stepan Mishura
>         Attachments: harmony-1975.patch
>
>
> This subtask will include a new patch for generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages. I'll provide this patch.

-- 
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