FULL PRODUCT VERSION :
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Wersja 6.1.7600]
A DESCRIPTION OF THE PROBLEM :
The bug appears when trying to create resource with filename '.' from annotation processor level. Folllowing line:
processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "foo", ".foo2", element)
java.lang.IllegalArgumentException: relativeName is invalid
In spec it is said:
"A relative name is a non-null, non-empty sequence of path segments separated by '/'.; '.' or '..' are invalid path segments."
But in that case '.' at the begining of filename is not the segment. There is a difference between ".foo2" and "./foo2". The first one seems to be correct filename. But I cannot create it with DefaultFileManager. There is no way to create resource starting with '.' character.
This bug can be reproduced always.