Review Request for JDK-8003992: File and other classes in java.io do not handle embedded nulls properly
dan.xu at oracle.com
Thu May 2 23:08:37 UTC 2013
Thanks for all your comments. Based on the previous feedback, I have
moved to the other approach, i.e., to fail file operations if the
invalid NUL characher is found in a file path. As you know, due to the
compatibility issue, we cannot throw an exception immediately in the
File constructors. So the failure is delayed and only shown up when any
file operation is triggered.
As for FileInputStream, FileOutputStream, and RandomAccessFile classes,
the FileNotFoundException will be thrown right away since their spec
allow this exception happen in the constructors. Thanks for your review!
More information about the core-libs-dev