FULL PRODUCT VERSION :
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-215)
Java HotSpot(TM) Client VM (build 1.4.2-50, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Ridiculous and unnecessary; please fix this requirement on your web site
A DESCRIPTION OF THE PROBLEM :
See http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/FileChannel.html#lock()
Notice that the exception descriptions refer to arguments that are not present in this overloaded variant of the method. Specifically
NonReadableChannelException - If shared is true this channel was not opened for reading
NonWritableChannelException - If shared is false but this channel was not opened for writing
There is no "shared" variable here. There is in the next overloaded varuiant of the lock method which does not show these exceptions. Possibly the doc comments got mixed up between the two methods, or possibly it's more serious. In either case, please fix and clarify the expected behavior here.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/FileChannel.html#lock()
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Correct javadoc
ACTUAL -
Incorrect javadoc
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
not executable
---------- END SOURCE ----------
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-215)
Java HotSpot(TM) Client VM (build 1.4.2-50, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Ridiculous and unnecessary; please fix this requirement on your web site
A DESCRIPTION OF THE PROBLEM :
See http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/FileChannel.html#lock()
Notice that the exception descriptions refer to arguments that are not present in this overloaded variant of the method. Specifically
NonReadableChannelException - If shared is true this channel was not opened for reading
NonWritableChannelException - If shared is false but this channel was not opened for writing
There is no "shared" variable here. There is in the next overloaded varuiant of the lock method which does not show these exceptions. Possibly the doc comments got mixed up between the two methods, or possibly it's more serious. In either case, please fix and clarify the expected behavior here.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/FileChannel.html#lock()
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Correct javadoc
ACTUAL -
Incorrect javadoc
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
not executable
---------- END SOURCE ----------