@Override
public boolean isUpdateable() {
try {
- return Files.exists(getPath());
+ Path path = getPath();
+ if(path == null)
+ return false;
+ return Files.exists(path);
} catch (IOException e) {
return false;
}
public void update(String newSourceText) {
try {
Path path = getPath();
+ if(path == null)
+ return;
Files.write(path, newSourceText.getBytes(Charset.forName("UTF-8")));
} catch(IOException e) {
e.printStackTrace();