This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: java.util.logging.Level


Hi list,


I just reverted a patch I commited some time ago. The strings are 
ensured to be intern, so we can use ==.


Michael


2004-05-06  Michael Koch  <konqueror@gmx.de>

	* java/util/logging/Level.java
	(parse): Use == instead of String.equals().

Index: java/util/logging/Level.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/logging/Level.java,v
retrieving revision 1.2
diff -u -r1.2 Level.java
--- java/util/logging/Level.java	11 Mar 2004 17:35:01 -0000	1.2
+++ java/util/logging/Level.java	6 May 2004 15:54:27 -0000
@@ -343,7 +343,7 @@
 
     for (int i = 0; i < knownLevels.length; i++)
     {
-      if (name.equals(knownLevels[i].name))
+      if (name == knownLevels[i].name)
 	return knownLevels[i];
     }
     

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]