harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r922278 - in /harmony/enhanced/classlib/trunk/modules/nio/src/main/java: common/org/apache/harmony/nio/internal/MappedByteBufferFactory.java unix/org/apache/harmony/nio/internal/EpollSelectorImpl.java
Date Fri, 12 Mar 2010 14:39:49 GMT
Author: tellison
Date: Fri Mar 12 14:39:49 2010
New Revision: 922278

URL: http://svn.apache.org/viewvc?rev=922278&view=rev
Log:
Apply patch for HARMONY-6465 ([classlib][nio]Small fixes according to the findbug results)

Modified:
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/unix/org/apache/harmony/nio/internal/EpollSelectorImpl.java

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/MappedByteBufferFactory.java?rev=922278&r1=922277&r2=922278&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
Fri Mar 12 14:39:49 2010
@@ -50,13 +50,13 @@ class MappedByteBufferFactory {
     }
 
     static MappedByteBuffer getBuffer(PlatformAddress addr, int mapmode,
-            long size, int offset) throws Exception {
+                                      long size, int offset) throws Exception {
         /*
          * Spec points out explicitly that the size of map should be no greater
          * than Integer.MAX_VALUE, so long to int cast is safe here.
          */
         return (MappedByteBuffer) constructor.newInstance(new Object[] { addr,
-                new Integer((int) size), new Integer(offset),
-                new Integer(mapmode) });
+                                                                         Integer.valueOf((int)size),
Integer.valueOf(offset),
+                                                                         Integer.valueOf(mapmode)
});
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/unix/org/apache/harmony/nio/internal/EpollSelectorImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/unix/org/apache/harmony/nio/internal/EpollSelectorImpl.java?rev=922278&r1=922277&r2=922278&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/unix/org/apache/harmony/nio/internal/EpollSelectorImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/unix/org/apache/harmony/nio/internal/EpollSelectorImpl.java
Fri Mar 12 14:39:49 2010
@@ -35,10 +35,8 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
-import java.lang.Class;
 
 import org.apache.harmony.luni.platform.FileDescriptorHandler;
-import org.apache.harmony.luni.platform.Platform;
 
 /*
  * Default implementation of java.nio.channels.Selector
@@ -504,7 +502,7 @@ final class EpollSelectorImpl extends Ab
 
         Entry deleted = new Entry(-1, null);
 
-        final int threshRatio = 4;
+        static final int threshRatio = 4;
 
         public InternalKeyMap() {
             this(1);



Mime
View raw message