[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/22726] String comparisons that use == or != instead of eq
From: |
gcc-bugzilla at gcc dot gnu dot org |
Subject: |
[Bug classpath/22726] String comparisons that use == or != instead of equals() |
Date: |
16 Oct 2005 01:26:49 -0000 |
The following lines perform comparisons with String literals using == or !=
instead of equals(). This is not guaranteed to produce the proper results when
the Strings are equal but not the exact same object.
gnu/java/net/protocol/jar/Handler.java : 102
java/net/URLStreamHandler.java : 407
java/nio/ByteOrder.java : 55
java/util/Locale.java : 439
java/util/Locale.java : 475
------- Comment #1 from from-classpath at savannah dot gnu dot org 2004-03-12
12:44 -------
I believe all this issues have been fixed now.
In the future it helps to include a real patch and/or point out the precise
version of the file in question.
------- Comment #2 from from-classpath at savannah dot gnu dot org 2004-12-30
00:10 -------
In java.util.Locale, strings are interned so == can be used.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22726
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/22726] String comparisons that use == or != instead of equals(),
gcc-bugzilla at gcc dot gnu dot org <=