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]

FYI: Patch: java.nio.ByteBuffer


Hi list,


I commited the attached patch to remove a redundant check in 
ByteBuffer.equals().



Michael
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2328
diff -u -b -B -r1.2328 ChangeLog
--- ChangeLog	11 Nov 2003 11:49:08 -0000	1.2328
+++ ChangeLog	11 Nov 2003 11:56:30 -0000
@@ -1,5 +1,10 @@
 2003-11-11  Michael Koch  <konqueror@gmx.de>
 
+	* java/nio/ByteBuffer.java
+	(equals): Remove redundant obj == null check.
+
+2003-11-11  Michael Koch  <konqueror@gmx.de>
+
 	* gnu/java/nio/natPipeImpl.cc,
 	gnu/java/nio/natSelectorImpl.cc: Removed
 	* gnu/java/nio/natPipeImplEcos.cc,
Index: java/nio/ByteBuffer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/nio/ByteBuffer.java,v
retrieving revision 1.13
diff -u -b -B -r1.13 ByteBuffer.java
--- java/nio/ByteBuffer.java	20 May 2003 08:58:31 -0000	1.13
+++ java/nio/ByteBuffer.java	11 Nov 2003 11:56:31 -0000
@@ -278,8 +278,7 @@
    */
   public boolean equals (Object obj)
   {
-    if (obj != null &&
-        obj instanceof ByteBuffer)
+    if (obj instanceof ByteBuffer)
       {
         return compareTo (obj) == 0;
       }

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