You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ray Chen (JIRA)" <ji...@apache.org> on 2010/05/21 12:03:17 UTC

[jira] Created: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

[java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
---------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-6516
                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Ray Chen


RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Ray Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870530#action_12870530 ] 

Ray Chen commented on HARMONY-6516:
-----------------------------------

Hi Jesse,
I am not sure if we can lobby the RI6 maintainers to fix their code.

I think what we can do right now is to keep our behavior as same as RI's.

Hi All,
Anyone else have any options about this issue? Can we lobby the RI6
maintainers to fix their code?




-- 
Regards,

Ray Chen



> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Ray Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ray Chen updated HARMONY-6516:
------------------------------

    Attachment: Harmony_6516.diff

A test case and a fix are in the patch.

> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Jesse Wilson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870040#action_12870040 ] 

Jesse Wilson commented on HARMONY-6516:
---------------------------------------

Isn't this a bug in RI6? Shouldn't we just report the bug to them rather than emulating their bogus behaviour?

> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Ray Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870362#action_12870362 ] 

Ray Chen commented on HARMONY-6516:
-----------------------------------

Hi Jesse,

I am not sure if it is really a "bug" in RI6, but we should make our
implementation's behavior same as RI's, right?





-- 
Regards,

Ray Chen



> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Ray Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870544#action_12870544 ] 

Ray Chen commented on HARMONY-6516:
-----------------------------------

Thanks Mark, I have closed this issue as you suggested.




-- 
Regards,

Ray Chen



> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Ray Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ray Chen reopened HARMONY-6516:
-------------------------------


Hi,
I found that HttpURLConnectionTest.test_UseCache_HttpURLConnection_getHeaderFields failed on RI, which invoke HttpURLConnection.getHeaderField(int position).

The spec does NOT require special order of the items, but seems the "position" parameter requires the order implicitly.

So shall we change the test case or the code? 

> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib, Non-bug differences from RI
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Jesse Wilson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870412#action_12870412 ] 

Jesse Wilson commented on HARMONY-6516:
---------------------------------------

There's two ways to make Harmony and the JDK agree:
 - change RI6 so that headers are in forward order
 - change Harmony so that headers are in reverse order

Since forward order is what application developers would want, the best fix is to lobby the RI6 maintainers to fix their code.

> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870539#action_12870539 ] 

Mark Hindess commented on HARMONY-6516:
---------------------------------------

I agree with Jesse that harmony behaviour is more sane.  We don't have to match the RI if the RI behaviour is unhelpful to developers. We should close this bug as non-bug difference rather than try "fix" the harmony code.

Whether we get the RI changed or not isn't really relevant but we should try to do that - by raising a bug or getting someone to do it on our behalf - if we can.  However, the fact that the behaviour changed between java5 and java6 and no one has complained enough that sun fixed it suggests to me that no one really relies on this behaviour.


> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Hindess updated HARMONY-6516:
----------------------------------

    Component/s: Non-bug differences from RI

Adding to non-bug difference component to aid tracking.

> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib, Non-bug differences from RI
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Ray Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ray Chen updated HARMONY-6516:
------------------------------

    Component/s:     (was: Non-bug differences from RI)

> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Ray Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ray Chen closed HARMONY-6516.
-----------------------------

    Resolution: Not A Problem

Close this defect as a non-bug difference.

> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order (HARMONY-6516)

Posted by Tim Ellison <t....@gmail.com>.
I agree with changing the test code, but I did look at the
implementation of Header [1] and think that using a TreeMap to store the
 fields is a bit of overkill.

I assume this was chosen just to get the case insensitive key matching
behavior, but I think it will be a memory hog.  And then the whole other
structure to track the field values ... urgh.

[1]
https://svn.apache.org/repos/asf/harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java

Regards,
Tim

On 11/Jun/2010 09:58, Ray Chen (JIRA) wrote:
>      [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> Ray Chen updated HARMONY-6516:
> ------------------------------
> 
>     Attachment: Harmony6516_v2.diff
> 
> Change the test code, to test whether the list contains the item instead of compare the value which depends on the order.
> 
>> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
>> ---------------------------------------------------------------------------------------------------------------------
>>
>>                 Key: HARMONY-6516
>>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>>             Project: Harmony
>>          Issue Type: Bug
>>          Components: Classlib
>>            Reporter: Ray Chen
>>         Attachments: Harmony6516_v2.diff, Harmony_6516.diff
>>
>>
>> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
>> So only fix this in java6 branch
> 

[jira] Updated: (HARMONY-6516) [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order

Posted by "Ray Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ray Chen updated HARMONY-6516:
------------------------------

    Attachment: Harmony6516_v2.diff

Change the test code, to test whether the list contains the item instead of compare the value which depends on the order.

> [java6][classlib][luni]Items in map which reterned by HttpURLConnection.getHeaderFields() should be in reverse order 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6516
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony6516_v2.diff, Harmony_6516.diff
>
>
> RI6 will retrun a map in which the items are in reverse order, however RI5 didn't require that.
> So only fix this in java6 branch

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.