You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Loenko (JIRA)" <ji...@apache.org> on 2006/05/29 09:01:32 UTC
[jira] Closed: (HARMONY-482) Some code compares Strings with ==
operator
[ http://issues.apache.org/jira/browse/HARMONY-482?page=all ]
Mikhail Loenko closed HARMONY-482:
----------------------------------
verified by Mikhail Fursov
> Some code compares Strings with == operator
> -------------------------------------------
>
> Key: HARMONY-482
> URL: http://issues.apache.org/jira/browse/HARMONY-482
> Project: Harmony
> Type: Bug
> Components: Classlib
> Reporter: Mikhail Fursov
> Assignee: Mikhail Loenko
> Priority: Trivial
> Attachments: patch.txt
>
> Some classes (e.g. org.apache.harmony.luni.internal.net.www.protocol.http.HttpUrlConnection) use string comparison by reference instead of comparison by value.
> Such optimization is legal but can lead to problems with compatibility and bugs when part of the code refactored.
> if (method == "GET")
> setRequestMethod("POST");
> // If the request method is neither PUT or POST, then you're not writing
> if (method != "PUT" && method != "POST")
> throw new ProtocolException(Msg.getString("K008f", method));
--
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