Author: gharley
Date: Fri Jun 30 06:47:06 2006
New Revision: 418283
URL: http://svn.apache.org/viewvc?rev=418283&view=rev
Log:
HARMONY 708 : Remove unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java?rev=418283&r1=418282&r2=418283&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
Fri Jun 30 06:47:06 2006
@@ -49,11 +49,8 @@
static MappedByteBuffer getBuffer(PlatformAddress addr, int mapmode,
long size, int offset) throws Exception {
- // FIXME: the long->int cast of size may be dangerous, but JavaSpec
- // specifies that the mmap size cannot be larger than
- // Integer.MAX_VALUE, may since the direct buffer only supports size of
- // 32 bits. Maybe int the later version(i.e. 64 bit platform)
- // this issue can be handled more elegantly
+ // Spec points out explicitly that the size of mmap 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) });
|