mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-13 21:01:01 +08:00
added NPE handling for missing sourcepath
This commit is contained in:
parent
2432db7a79
commit
445a6c3967
@ -463,9 +463,15 @@ public class Processor {
|
||||
|
||||
// msg.printMessage(Kind.NOTE, "packageElement = " + (packageElement != null ? packageElement.getQualifiedName() : "null"));
|
||||
|
||||
return env.getFiler().getResource(StandardLocation.SOURCE_PATH,
|
||||
packageElement.getQualifiedName(),
|
||||
sourceElement.getSimpleName() + ".java");
|
||||
try{
|
||||
return env.getFiler().getResource(StandardLocation.SOURCE_PATH,
|
||||
packageElement.getQualifiedName(),
|
||||
sourceElement.getSimpleName() + ".java");
|
||||
}catch(NullPointerException e){
|
||||
throw new IllegalStateException(
|
||||
"Make sure that the -sourcepath parameter is given to the Compiler", e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user