You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Xiao Shu (JIRA)" <ji...@apache.org> on 2010/07/27 08:57:16 UTC
[jira] Created: (HARMONY-6603) [classlib][luni]
org.apache.harmony.luni.internal.net.www.protocol.http.Header could not
tolerate null key
[classlib][luni] org.apache.harmony.luni.internal.net.www.protocol.http.Header could not tolerate null key
----------------------------------------------------------------------------------------------------------
Key: HARMONY-6603
URL: https://issues.apache.org/jira/browse/HARMONY-6603
Project: Harmony
Issue Type: Bug
Components: Classlib
Affects Versions: 5.0M14
Reporter: Xiao Shu
TreeMap(String.CASE_INSENSITIVE_ORDER) could not tolerate null key, but key for staus line is null.
Thus, NullPointerException occurs while initializing the Header with a map contains null status line key.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6603) [classlib][luni]
org.apache.harmony.luni.internal.net.www.protocol.http.Header could not
tolerate null key
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892736#action_12892736 ]
Tim Ellison commented on HARMONY-6603:
--------------------------------------
No need to go quite so excessive with the values though :-) We'd usually just use -1, 0, +1 to indicate ordering.
> [classlib][luni] org.apache.harmony.luni.internal.net.www.protocol.http.Header could not tolerate null key
> ----------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6603
> URL: https://issues.apache.org/jira/browse/HARMONY-6603
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M14
> Reporter: Xiao Shu
>
> TreeMap(String.CASE_INSENSITIVE_ORDER) could not tolerate null key, but key for staus line is null.
> Thus, NullPointerException occurs while initializing the Header with a map contains null status line key.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6603) [classlib][luni]
org.apache.harmony.luni.internal.net.www.protocol.http.Header could not
tolerate null key
Posted by "Xiao Shu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892676#action_12892676 ]
Xiao Shu commented on HARMONY-6603:
-----------------------------------
using
new Comparator<String>() {
public int compare(String o1, String o2) {
if (o1 == null && o2 == null) {
return 0;
}
if (o1 == null) {
return Integer.MIN_VALUE;
}
if (o2 == null) {
return Integer.MAX_VALUE;
}
return o1.hashCode() - o2.hashCode();
}
}
instead of String.CASE_INSENSITIVE_ORDER comparator.
Thus it could tolerate null key, the key ordering is the same as HashMap.
and it would not break fix for https://issues.apache.org/jira/browse/HARMONY-6452
> [classlib][luni] org.apache.harmony.luni.internal.net.www.protocol.http.Header could not tolerate null key
> ----------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6603
> URL: https://issues.apache.org/jira/browse/HARMONY-6603
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M14
> Reporter: Xiao Shu
>
> TreeMap(String.CASE_INSENSITIVE_ORDER) could not tolerate null key, but key for staus line is null.
> Thus, NullPointerException occurs while initializing the Header with a map contains null status line key.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.