On 01/10/14 21:57, Steven Schveighoffer wrote:

./progThatExpectsFilename ""

-Steve

It's the developer's responsibility to make sure a value like that never reaches the "File" constructor. That is, the developer of the "progThatExpectsFilename" application that uses "File". Not the developer of "File".

Although, I don't see why you shouldn't be able to pass an empty string to "File". You'll just get an exception, "cannot open file ''". This is exactly what happens in Bash:

$ echo "asd" > ""
-bash: : No such file or directory

--
/Jacob Carlborg

Reply via email to