mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
fix some API compatibility issues in the class library
This commit is contained in:
@ -94,21 +94,36 @@ public class File {
|
||||
return exists(path);
|
||||
}
|
||||
|
||||
private static native void mkdir(String path);
|
||||
private static native void mkdir(String path) throws IOException;
|
||||
|
||||
public void mkdir() {
|
||||
mkdir(path);
|
||||
public boolean mkdir() {
|
||||
try {
|
||||
mkdir(path);
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static native void createNewFile(String path);
|
||||
private static native void createNewFile(String path) throws IOException;
|
||||
|
||||
public void createNewFile() {
|
||||
createNewFile(path);
|
||||
public boolean createNewFile() {
|
||||
try {
|
||||
createNewFile(path);
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static native boolean delete(String path);
|
||||
public static native void delete(String path) throws IOException;
|
||||
|
||||
public boolean delete() {
|
||||
return delete(path);
|
||||
try {
|
||||
delete(path);
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,8 +30,8 @@ public class Logger {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<Handler> getHandlers() {
|
||||
return new ArrayList<Handler>(handlers);
|
||||
public Handler[] getHandlers() {
|
||||
return handlers.toArray(new Handler[handlers.size()]);
|
||||
}
|
||||
|
||||
public void addHandler(Handler handler) {
|
||||
|
Reference in New Issue
Block a user