United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6769976 (fc) FileChannelImpl.isAMappedBufferField not used
JDK-6769976 : (fc) FileChannelImpl.isAMappedBufferField not used

Details
Type:
Bug
Submit Date:
2008-11-11
Status:
Resolved
Updated Date:
2010-05-06
Project Name:
JDK
Resolved Date:
2009-01-31
Component:
core-libs
OS:
generic
Sub-Component:
java.nio
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
isAMappedBuffer is a static field in sun.nio.ch.FileChannelImpl initiated in the classes' static initializer but not used.

                                    

Comments
EVALUATION

Introduced by 4652496 in 1.4.1 and subsequently orphaned by other changes in that release.
                                     
2008-11-11
SUGGESTED FIX

src/share/classes/sun/nio/ch/FileChannelImpl.java
*** 58,70 ****
      private static final NativeDispatcher nd;
  
      // Memory allocation size for mapping buffers
      private static final long allocationGranularity;
  
-     // Cached field for MappedByteBuffer.isAMappedBuffer
-     private static final Field isAMappedBufferField;
- 
      // File descriptor
      private final FileDescriptor fd;
  
      // File access mode (immutable)
      private final boolean writable;
--- 58,67 ----
*** 1313,1322 ****
  
      static {
          Util.load();
          allocationGranularity = initIDs();
          nd = new FileDispatcher();
-         isAMappedBufferField = Reflect.lookupField("java.nio.MappedByteBuffer",
-                                           "isAMappedBuffer");
      }
  
  }
--- 1310,1317 ---
                                     
2009-01-22



Hardware and Software, Engineered to Work Together