You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Zhang (JIRA)" <ji...@apache.org> on 2006/06/29 09:33:29 UTC

[jira] Created: (HARMONY-708) [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory

[classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory
------------------------------------------------------------------------------------------------------

         Key: HARMONY-708
         URL: http://issues.apache.org/jira/browse/HARMONY-708
     Project: Harmony
        Type: Improvement

  Components: Classlib  
    Reporter: Andrew Zhang
    Priority: Minor


The FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory is unnecessary. 

// 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

The FIXME explains clearly why the method takes long->int cast. But it's not dangerous because spec says:
"long size - The size of the region to be mapped; must be non-negative and no greater than Integer.MAX_VALUE".

I'll upload a patch soon. 

Thanks!

Best regards,
Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-708) [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory

Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-708?page=comments#action_12418789 ] 

Andrew Zhang commented on HARMONY-708:
--------------------------------------

Hello George,

The fix looks fine, thanks!

Best regards,
Andrew

> [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory
> ------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-708
>          URL: http://issues.apache.org/jira/browse/HARMONY-708
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: nio.diff
>
> The FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory is unnecessary. 
> // 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
> The FIXME explains clearly why the method takes long->int cast. But it's not dangerous because spec says:
> "long size - The size of the region to be mapped; must be non-negative and no greater than Integer.MAX_VALUE".
> I'll upload a patch soon. 
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HARMONY-708) [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-708?page=all ]
     
George Harley resolved HARMONY-708:
-----------------------------------

    Resolution: Fixed

Hi Andrew, 

Committed in revision 418283. Please could you check that your change has been applied as expected. 

Best regards, 
George


> [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory
> ------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-708
>          URL: http://issues.apache.org/jira/browse/HARMONY-708
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: nio.diff
>
> The FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory is unnecessary. 
> // 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
> The FIXME explains clearly why the method takes long->int cast. But it's not dangerous because spec says:
> "long size - The size of the region to be mapped; must be non-negative and no greater than Integer.MAX_VALUE".
> I'll upload a patch soon. 
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (HARMONY-708) [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-708?page=all ]
     
George Harley closed HARMONY-708:
---------------------------------


Verified by Andrew.

> [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory
> ------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-708
>          URL: http://issues.apache.org/jira/browse/HARMONY-708
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: nio.diff
>
> The FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory is unnecessary. 
> // 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
> The FIXME explains clearly why the method takes long->int cast. But it's not dangerous because spec says:
> "long size - The size of the region to be mapped; must be non-negative and no greater than Integer.MAX_VALUE".
> I'll upload a patch soon. 
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-708) [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory

Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-708?page=all ]

Andrew Zhang updated HARMONY-708:
---------------------------------

    Attachment: nio.diff

Hello,

Would you please try my patch?

Thanks!

Best regards,
Andrew

> [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory
> ------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-708
>          URL: http://issues.apache.org/jira/browse/HARMONY-708
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Priority: Minor
>  Attachments: nio.diff
>
> The FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory is unnecessary. 
> // 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
> The FIXME explains clearly why the method takes long->int cast. But it's not dangerous because spec says:
> "long size - The size of the region to be mapped; must be non-negative and no greater than Integer.MAX_VALUE".
> I'll upload a patch soon. 
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (HARMONY-708) [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-708?page=all ]

George Harley reassigned HARMONY-708:
-------------------------------------

    Assign To: George Harley

> [classlib][nio] Remove an unnecessary FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory
> ------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-708
>          URL: http://issues.apache.org/jira/browse/HARMONY-708
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: nio.diff
>
> The FIXME in org.apache.harmony.nio.internal.MappedByteBufferFactory is unnecessary. 
> // 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
> The FIXME explains clearly why the method takes long->int cast. But it's not dangerous because spec says:
> "long size - The size of the region to be mapped; must be non-negative and no greater than Integer.MAX_VALUE".
> I'll upload a patch soon. 
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira