ByteBuffer.allocateDirect calls DirectByteBufferImpl.allocate which does not exist. So the call goes to ByteBuffer.allocate (as DirectByteBufferImpl extends from ByteBuffer) which returns a regular (non-direct) ByteBuffer.
-- Summary: ByteBuffer.allocateDirect does not return a direct buffer Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: juhal at users dot sourceforge dot net CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org,konqueror at gmx dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18114