bug with File.mkdir?

Alan Bateman Alan.Bateman at oracle.com
Mon Jul 30 03:40:26 UTC 2012


On 30/07/2012 01:53, jjian fan wrote:
> Hi:
>     Guys, anyone knows there is any bug in Java.io.File.mkdir?  In our high
> cocurrent scala message system, we create directory like ax-0,ax-1,ax-2,
> but File.mkdir sometimes just create directory ax.
You say the version is "1.7.0_05-icedtea" so I assume this is Linux. Is 
there any chance that "topic" contains one or more characters that 
encode to bytes that include NUL (0). That might explain why the 
directory is created as "ax". If you change the code to use 
java.nio.file.Path then you will be able to detect this.

-Alan.



More information about the core-libs-dev mailing list