-
Enhancement
-
Resolution: Not an Issue
-
P4
-
None
-
6
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
Assume I have:
ByteBuffer bb;
For reading the first byte of this Buffer after filling I must code:
((ByteBuffer)bb.flip()).get();
JUSTIFICATION :
To avoid the cast to ByteBuffer, class Buffer must be generified.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
This should be valid:
bb.flip().get();
ACTUAL -
Casting needed:
((ByteBuffer)bb.flip()).get();
CUSTOMER SUBMITTED WORKAROUND :
Casting
Assume I have:
ByteBuffer bb;
For reading the first byte of this Buffer after filling I must code:
((ByteBuffer)bb.flip()).get();
JUSTIFICATION :
To avoid the cast to ByteBuffer, class Buffer must be generified.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
This should be valid:
bb.flip().get();
ACTUAL -
Casting needed:
((ByteBuffer)bb.flip()).get();
CUSTOMER SUBMITTED WORKAROUND :
Casting
- relates to
-
JDK-4774077 Use covariant return types in the NIO buffer hierarchy
- Closed