fix: make code java 11 compatible
This commit is contained in:
parent
8924e7aadc
commit
4f22e76d2b
@ -11,7 +11,7 @@ public abstract class FunctionValue extends ObjectValue {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "function %s(...)".formatted(name);
|
return String.format("function %s(...)", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract Object call(Context ctx, Object thisArg, Object ...args);
|
public abstract Object call(Context ctx, Object thisArg, Object ...args);
|
||||||
|
@ -34,13 +34,13 @@ public class FilesystemException extends RuntimeException {
|
|||||||
public final FSCode code;
|
public final FSCode code;
|
||||||
|
|
||||||
public FilesystemException(String message, String filename, FSCode code) {
|
public FilesystemException(String message, String filename, FSCode code) {
|
||||||
super(code + ": " + message.formatted(filename));
|
super(code + ": " + String.format(message, filename));
|
||||||
this.message = message;
|
this.message = message;
|
||||||
this.code = code;
|
this.code = code;
|
||||||
this.filename = filename;
|
this.filename = filename;
|
||||||
}
|
}
|
||||||
public FilesystemException(String filename, FSCode code) {
|
public FilesystemException(String filename, FSCode code) {
|
||||||
super(code + ": " + MESSAGES[code.code].formatted(filename));
|
super(code + ": " + String.format(MESSAGES[code.code], filename));
|
||||||
this.message = MESSAGES[code.code];
|
this.message = MESSAGES[code.code];
|
||||||
this.code = code;
|
this.code = code;
|
||||||
this.filename = filename;
|
this.filename = filename;
|
||||||
|
@ -9,7 +9,7 @@ public class Permission {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "State [pr=%s;trg=%s;wildN=%s;wild=%s]".formatted(predI, trgI, wildcardI, wildcard);
|
return String.format("State [pr=%s;trg=%s;wildN=%s;wild=%s]", predI, trgI, wildcardI, wildcard);
|
||||||
}
|
}
|
||||||
|
|
||||||
public State(int predicateI, int targetI, int wildcardI, boolean wildcard) {
|
public State(int predicateI, int targetI, int wildcardI, boolean wildcard) {
|
||||||
|
Loading…
Reference in New Issue
Block a user