mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-26 17:39:37 -04:00
More fixes for proxies
This commit is contained in:
@@ -74,6 +74,13 @@ public class JacksonMapper {
|
||||
return INSTANCE.copy();
|
||||
}
|
||||
|
||||
public static ObjectMapper getDefault() {
|
||||
if (!JacksonMapper.isInit()) {
|
||||
return DEFAULT;
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public static boolean isInit() {
|
||||
return init;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class JacksonizedValue {
|
||||
|
||||
@SneakyThrows
|
||||
public final String toString() {
|
||||
var tree = JacksonMapper.newMapper().valueToTree(this);
|
||||
var tree = JacksonMapper.getDefault().valueToTree(this);
|
||||
return tree.toPrettyString();
|
||||
}
|
||||
|
||||
@@ -25,14 +25,14 @@ public class JacksonizedValue {
|
||||
return false;
|
||||
}
|
||||
|
||||
var tree = JacksonMapper.newMapper().valueToTree(this);
|
||||
var otherTree = JacksonMapper.newMapper().valueToTree(o);
|
||||
var tree = JacksonMapper.getDefault().valueToTree(this);
|
||||
var otherTree = JacksonMapper.getDefault().valueToTree(o);
|
||||
return tree.equals(otherTree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
var tree = JacksonMapper.newMapper().valueToTree(this);
|
||||
var tree = JacksonMapper.getDefault().valueToTree(this);
|
||||
return tree.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class XPipeInstallation {
|
||||
|
||||
public static Optional<String> getInstallationExecutable(ShellProcessControl p) throws Exception {
|
||||
var installation = getDefaultInstallationBasePath(p);
|
||||
var executable = FileNames.join(installation, getDaemonExecutableInInstallationDirectory(p.getOsType()));
|
||||
var executable = getDaemonExecutableInInstallationDirectory(p.getOsType());
|
||||
var file = FileNames.join(installation, executable);
|
||||
try (CommandProcessControl c =
|
||||
p.command(p.getShellType().createFileExistsCommand(file)).start()) {
|
||||
|
||||
Reference in New Issue
Block a user