When new File object is constructed , if it has relative path without any perfix , like when running codegen command directly in same directory , getParentFile() method retrurns null. But when we first get getAbsoluteFile() , It returns same file with absolute path. Then getting getParentFile() seems working fiine. http://docs.oracle.com/javase/7/docs/api/java/io/File.html#getParentFile()
When new File object is constructed , if it has relative path without any perfix , like when running codegen command directly in same directory , getParentFile() method retrurns null. But when we first get getAbsoluteFile() , It returns same file with absolute path. Then getting getParentFile() seems working fiine. http://docs.oracle.com/javase/7/docs/api/java/io/File.html#getParentFile()