@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();
unique :: [a] -> [a]
"Like `unique`, but uses the given function for finding the key values used for uniqueness testing."
- uniqueBy :: (a -> b) -> [a] -> [a]
+ uniqueBy :: (a -> <e> b) -> [a] -> <e> [a]
"Works like `unique` but uses the given function for equality tests."
uniqueWith :: (a -> a -> Boolean) -> [a] -> [a]