On 27/02/2013 02:31, Dan Xu wrote:
Thank you, Mike.
The reason not to throw out an exception is for the backward
compatibility. Due to that, the constructorof File object with NUL
willnever fail.While in NIO, it is defined in the spec to throw out
exceptions when invalid NUL character is found.
-Dan
Right, we can't change the constructor to throw an exception,
particularly if this fix is going to be back-ported to 7u. For NIO then
it's not an issue because getPath was specified from the begining to
throw the unexpected InvalidPathException when it is given garbage.
-Alan.