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-1975) [classlib][swing] Further generification of the javax.swing.table, javax.swing.text.* and javax.swing.tree packages.
Date Fri, 27 Oct 2006 11:56:18 GMT
    [ 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

        

Mime
View raw message