diff --git a/app/src/main/java/io/xpipe/app/action/ActionShortcutComp.java b/app/src/main/java/io/xpipe/app/action/ActionShortcutComp.java index 2c2b723e7..793709fc0 100644 --- a/app/src/main/java/io/xpipe/app/action/ActionShortcutComp.java +++ b/app/src/main/java/io/xpipe/app/action/ActionShortcutComp.java @@ -106,6 +106,7 @@ public class ActionShortcutComp extends SimpleComp { return group; } + @SuppressWarnings("unused") private Comp createMacroComp() { var button = new ButtonComp( AppI18n.observable("createMacro"), new FontIcon("mdi2c-clipboard-multiple-outline"), onCreateMacro); diff --git a/app/src/main/java/io/xpipe/app/comp/base/ModalOverlay.java b/app/src/main/java/io/xpipe/app/comp/base/ModalOverlay.java index 7186c2296..5e13adbc9 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/ModalOverlay.java +++ b/app/src/main/java/io/xpipe/app/comp/base/ModalOverlay.java @@ -60,10 +60,6 @@ public class ModalOverlay { return this; } - public ModalOverlay withDefaultButtons() { - return withDefaultButtons(() -> {}); - } - public ModalButton addButton(ModalButton button) { buttons.add(button); return button; diff --git a/app/src/main/java/io/xpipe/app/core/AppActionLinkDetector.java b/app/src/main/java/io/xpipe/app/core/AppActionLinkDetector.java index 0e69c3ce2..018391947 100644 --- a/app/src/main/java/io/xpipe/app/core/AppActionLinkDetector.java +++ b/app/src/main/java/io/xpipe/app/core/AppActionLinkDetector.java @@ -36,19 +36,6 @@ public class AppActionLinkDetector { AppOpenArguments.handle(List.of(content)); } - public static void detectOnFocus() { - var content = getClipboardAction(); - if (content == null) { - lastDetectedAction = null; - return; - } - if (content.equals(lastDetectedAction)) { - return; - } - lastDetectedAction = content; - handle(content, true); - } - public static void detectOnPaste() { var content = getClipboardAction(); if (content == null) { diff --git a/app/src/main/java/io/xpipe/app/core/AppNames.java b/app/src/main/java/io/xpipe/app/core/AppNames.java index 0df71a5bf..1bc8d6d02 100644 --- a/app/src/main/java/io/xpipe/app/core/AppNames.java +++ b/app/src/main/java/io/xpipe/app/core/AppNames.java @@ -22,10 +22,6 @@ public abstract class AppNames { return ofCurrent().getGroupName() + ".app" + (name != null ? "." + name : ""); } - public static String appModuleName(String name) { - return ofCurrent().getGroupName() + name; - } - public static String extModuleName(String name) { return ofCurrent().getGroupName() + ".ext." + name; } diff --git a/app/src/main/java/io/xpipe/app/core/AppSystemInfo.java b/app/src/main/java/io/xpipe/app/core/AppSystemInfo.java index b689c1c52..3f7581656 100644 --- a/app/src/main/java/io/xpipe/app/core/AppSystemInfo.java +++ b/app/src/main/java/io/xpipe/app/core/AppSystemInfo.java @@ -16,9 +16,9 @@ public abstract class AppSystemInfo { public static AppSystemInfo ofCurrent() { return switch (OsType.getLocal()) { - case OsType.Linux linux -> ofLinux(); - case OsType.MacOs macOs -> ofMacOs(); - case OsType.Windows windows -> ofWindows(); + case OsType.Linux ignored -> ofLinux(); + case OsType.MacOs ignored -> ofMacOs(); + case OsType.Windows ignored -> ofWindows(); }; } diff --git a/app/src/main/java/io/xpipe/app/core/AppTheme.java b/app/src/main/java/io/xpipe/app/core/AppTheme.java index 5cb79eaa1..520d4daf2 100644 --- a/app/src/main/java/io/xpipe/app/core/AppTheme.java +++ b/app/src/main/java/io/xpipe/app/core/AppTheme.java @@ -426,6 +426,7 @@ public class AppTheme { 91); // Adjust this to create your own theme + @SuppressWarnings("unused") public static final Theme CUSTOM = new DerivedTheme( "custom", "primer", diff --git a/app/src/main/java/io/xpipe/app/core/AppWindowsShutdown.java b/app/src/main/java/io/xpipe/app/core/AppWindowsShutdown.java index ab5383714..060ecc29a 100644 --- a/app/src/main/java/io/xpipe/app/core/AppWindowsShutdown.java +++ b/app/src/main/java/io/xpipe/app/core/AppWindowsShutdown.java @@ -39,9 +39,11 @@ public class AppWindowsShutdown { public interface WinHookProc extends WinUser.HOOKPROC { + @SuppressWarnings("unused") WinDef.LRESULT callback(int nCode, WinDef.WPARAM wParam, CWPSSTRUCT hookProcStruct); } + @SuppressWarnings("unused") public static class CWPSSTRUCT extends Structure { public WinDef.LPARAM lParam; public WinDef.WPARAM wParam; diff --git a/app/src/main/java/io/xpipe/app/core/check/AppCertutilCheck.java b/app/src/main/java/io/xpipe/app/core/check/AppCertutilCheck.java index c59307520..4aec2fed3 100644 --- a/app/src/main/java/io/xpipe/app/core/check/AppCertutilCheck.java +++ b/app/src/main/java/io/xpipe/app/core/check/AppCertutilCheck.java @@ -8,6 +8,7 @@ import io.xpipe.core.OsType; import java.util.concurrent.TimeUnit; +@SuppressWarnings("unused") public class AppCertutilCheck { private static boolean getResult() { diff --git a/app/src/main/java/io/xpipe/app/ext/ExtensionException.java b/app/src/main/java/io/xpipe/app/ext/ExtensionException.java index 904e65230..bdd0b4e38 100644 --- a/app/src/main/java/io/xpipe/app/ext/ExtensionException.java +++ b/app/src/main/java/io/xpipe/app/ext/ExtensionException.java @@ -7,22 +7,10 @@ public class ExtensionException extends RuntimeException { public ExtensionException() {} - private ExtensionException(String message) { - super(message); - } - private ExtensionException(String message, Throwable cause) { super(message, cause); } - public ExtensionException(Throwable cause) { - super(cause); - } - - public ExtensionException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } - public static ExtensionException corrupt(String message, Throwable cause) { try { var loc = AppInstallation.ofCurrent().getBaseInstallationPath(); diff --git a/app/src/main/java/io/xpipe/app/hub/comp/StoreCategoryWrapper.java b/app/src/main/java/io/xpipe/app/hub/comp/StoreCategoryWrapper.java index 598f8bd27..8239f8f44 100644 --- a/app/src/main/java/io/xpipe/app/hub/comp/StoreCategoryWrapper.java +++ b/app/src/main/java/io/xpipe/app/hub/comp/StoreCategoryWrapper.java @@ -93,19 +93,6 @@ public class StoreCategoryWrapper { return cachedParent; } - public boolean contains(StoreEntryWrapper entry) { - if (entry.getCategory().getValue() == this) { - return true; - } - - for (var c : children.getList()) { - if (c.contains(entry)) { - return true; - } - } - return false; - } - public void select() { PlatformThread.runLaterIfNeeded(() -> { StoreViewState.get().getActiveCategory().setValue(this); diff --git a/app/src/main/java/io/xpipe/app/hub/comp/StoreChoiceComp.java b/app/src/main/java/io/xpipe/app/hub/comp/StoreChoiceComp.java index aff88be86..d001850ef 100644 --- a/app/src/main/java/io/xpipe/app/hub/comp/StoreChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/hub/comp/StoreChoiceComp.java @@ -57,11 +57,6 @@ public class StoreChoiceComp extends SimpleComp { return new StoreChoiceComp<>(Mode.OTHER, null, selected, clazz, filter, initialCategory); } - public static StoreChoiceComp proxy( - Property> selected, StoreCategoryWrapper initialCategory) { - return new StoreChoiceComp<>(Mode.PROXY, null, selected, ShellStore.class, null, initialCategory); - } - public static StoreChoiceComp host( Property> selected, StoreCategoryWrapper initialCategory) { return new StoreChoiceComp<>(Mode.HOST, null, selected, ShellStore.class, null, initialCategory); diff --git a/app/src/main/java/io/xpipe/app/hub/comp/StoreCreationMenu.java b/app/src/main/java/io/xpipe/app/hub/comp/StoreCreationMenu.java index aa480bc12..4089f5519 100644 --- a/app/src/main/java/io/xpipe/app/hub/comp/StoreCreationMenu.java +++ b/app/src/main/java/io/xpipe/app/hub/comp/StoreCreationMenu.java @@ -107,19 +107,33 @@ public class StoreCreationMenu { private static Menu categoryMenu( String name, String graphic, DataStoreCreationCategory category, String defaultProvider) { - var sub = DataStoreProviders.getAll().stream() + var providers = DataStoreProviders.getAll().stream() .filter(dataStoreProvider -> category.equals(dataStoreProvider.getCreationCategory())) + .sorted(Comparator.comparingInt(dataStoreProvider -> dataStoreProvider.getOrderPriority())) .toList(); var menu = new Menu(); menu.setGraphic(new FontIcon(graphic)); menu.textProperty().bind(AppI18n.observable(name)); + + if (providers.isEmpty()) { + return menu; + } + menu.setOnAction(event -> { if (event.getTarget() != menu) { return; } Platform.runLater(() -> { + if (defaultProvider != null) { + providers.stream().filter(dataStoreProvider -> dataStoreProvider.getId().equals(defaultProvider)).findFirst().ifPresent(dataStoreProvider -> { + var index = providers.indexOf(dataStoreProvider); + menu.getItems().get(index).fire(); + }); + return; + } + var onlyItem = menu.getItems().getFirst(); onlyItem.fire(); }); @@ -128,13 +142,6 @@ public class StoreCreationMenu { menu.getParentPopup().hide(); }); - var providers = sub.stream() - .sorted(Comparator.comparingInt(dataStoreProvider -> dataStoreProvider.getOrderPriority())) - .toList(); - if (providers.isEmpty()) { - return menu; - } - int lastOrder = providers.getFirst().getOrderPriority(); for (io.xpipe.app.ext.DataStoreProvider dataStoreProvider : providers) { if (dataStoreProvider.getOrderPriority() != lastOrder) { diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java index c341d193f..ae710e750 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -82,8 +82,13 @@ public final class AppPrefs { .requiresRestart(false) .documentationLink(DocumentationLink.API) .build()); - final BooleanProperty enableMcpServer = - mapLocal(new GlobalBooleanProperty(false), "enableMcpServer", Boolean.class, false); + final BooleanProperty enableMcpServer = map(Mapping.builder() + .property(new GlobalBooleanProperty(false)) + .key("enableMcpServer") + .valueClass(Boolean.class) + .requiresRestart(false) + .documentationLink(DocumentationLink.MCP) + .build()); final BooleanProperty enableMcpMutationTools = mapLocal(new GlobalBooleanProperty(false), "enableMcpMutationTools", Boolean.class, false); final BooleanProperty dontAutomaticallyStartVmSshServer = @@ -517,10 +522,6 @@ public final class AppPrefs { return disableCertutilUse; } - public ObservableBooleanValue useLocalFallbackShell() { - return useLocalFallbackShell; - } - public ObservableValue localShellDialect() { return localShellDialect; } diff --git a/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java b/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java index dfc6f134e..dc1faaae9 100644 --- a/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java +++ b/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java @@ -219,6 +219,7 @@ public interface ExternalEditorType extends PrefsChoiceValue { }; // Cli is broken, keep inactive + @SuppressWarnings("unused") WindowsType THEIAIDE_WINDOWS = new WindowsType() { @Override @@ -529,7 +530,7 @@ public interface ExternalEditorType extends PrefsChoiceValue { TEXT_EDIT); List CROSS_PLATFORM_EDITORS = List.of(FLEET, INTELLIJ, PYCHARM, WEBSTORM, CLION); - @SuppressWarnings("TrivialFunctionalExpressionUsage") + @SuppressWarnings({"unused", "TrivialFunctionalExpressionUsage"}) List ALL = ((Supplier>) () -> { var all = new ArrayList(); if (OsType.getLocal() == OsType.WINDOWS) { diff --git a/app/src/main/java/io/xpipe/app/process/ShellDialectAskpass.java b/app/src/main/java/io/xpipe/app/process/ShellDialectAskpass.java index c14d9f6e8..8cc17f2cc 100644 --- a/app/src/main/java/io/xpipe/app/process/ShellDialectAskpass.java +++ b/app/src/main/java/io/xpipe/app/process/ShellDialectAskpass.java @@ -5,7 +5,7 @@ import java.util.UUID; public interface ShellDialectAskpass { - String prepareStderrPassthroughContent(ShellControl sc, UUID requestId, String prefix); + String prepareStderrPassthroughContent(UUID requestId, String prefix); String prepareFixedContent(ShellControl sc, String fileName, List s) throws Exception; diff --git a/app/src/main/java/io/xpipe/app/process/ShellDumbMode.java b/app/src/main/java/io/xpipe/app/process/ShellDumbMode.java index d356b2e2c..4f8da59bc 100644 --- a/app/src/main/java/io/xpipe/app/process/ShellDumbMode.java +++ b/app/src/main/java/io/xpipe/app/process/ShellDumbMode.java @@ -14,7 +14,7 @@ public interface ShellDumbMode { return null; } - default CommandBuilder prepareInlineDumbCommand(ShellControl self, ShellControl parent, ShellOpenFunction function) + default CommandBuilder prepareInlineDumbCommand(ShellControl self, ShellOpenFunction function) throws Exception { return function.prepareWithoutInitCommand(); } diff --git a/app/src/main/java/io/xpipe/app/pwman/EnpassPasswordManager.java b/app/src/main/java/io/xpipe/app/pwman/EnpassPasswordManager.java index 45084b8c9..7caf31202 100644 --- a/app/src/main/java/io/xpipe/app/pwman/EnpassPasswordManager.java +++ b/app/src/main/java/io/xpipe/app/pwman/EnpassPasswordManager.java @@ -48,6 +48,7 @@ public class EnpassPasswordManager implements PasswordManager { return SHELL; } + @SuppressWarnings("unused") public static OptionsBuilder createOptions(Property p) { var prop = new SimpleObjectProperty<>(p.getValue().getVaultPath()); var comp = new ContextualFileReferenceChoiceComp( diff --git a/app/src/main/java/io/xpipe/app/pwman/PasswordManagerCommand.java b/app/src/main/java/io/xpipe/app/pwman/PasswordManagerCommand.java index f770f53f7..3018885af 100644 --- a/app/src/main/java/io/xpipe/app/pwman/PasswordManagerCommand.java +++ b/app/src/main/java/io/xpipe/app/pwman/PasswordManagerCommand.java @@ -33,6 +33,7 @@ public class PasswordManagerCommand implements PasswordManager { private static ShellControl SHELL; ShellScript script; + @SuppressWarnings("unused") static OptionsBuilder createOptions(Property property) { var template = new SimpleObjectProperty(); var script = new SimpleObjectProperty<>( diff --git a/app/src/main/java/io/xpipe/app/terminal/MobaXTermTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/MobaXTermTerminalType.java index 00a874967..6384647aa 100644 --- a/app/src/main/java/io/xpipe/app/terminal/MobaXTermTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/MobaXTermTerminalType.java @@ -33,28 +33,26 @@ public class MobaXTermTerminalType implements ExternalApplicationType.WindowsTyp @Override public void launch(TerminalLaunchConfiguration configuration) throws Exception { - try (var sc = LocalShell.getShell()) { - SshLocalBridge.init(); - var b = SshLocalBridge.get(); - var abs = b.getIdentityKey().toAbsolutePath(); - var drivePath = - "/drives/" + abs.getRoot().toString().substring(0, 1).toLowerCase() + "/" - + abs.getRoot().relativize(abs).toString().replaceAll("\\\\", "/"); - var winPath = b.getIdentityKey().toString().replaceAll("\\\\", "\\\\\\\\"); - var command = CommandBuilder.of() - .add("ssh") - .addQuoted(b.getUser() + "@localhost") - .add("-i") - .add("\"$(cygpath -u \"" + winPath + "\" || echo \"" + drivePath + "\")\"") - .add("-p") - .add("" + b.getPort()); - // Don't use local shell to build as it uses cygwin - var rawCommand = command.buildSimple(); - var script = ShellTemp.getLocalTempDataDirectory("mobaxpipe.sh"); - Files.writeString(Path.of(script.toString()), "#!/usr/bin/env bash\n" + rawCommand); - var fixedFile = script.toString().replaceAll("\\\\", "/").replaceAll("\\s", "\\$0"); - launch(CommandBuilder.of().add("-newtab").add(fixedFile)); - } + SshLocalBridge.init(); + var b = SshLocalBridge.get(); + var abs = b.getIdentityKey().toAbsolutePath(); + var drivePath = + "/drives/" + abs.getRoot().toString().substring(0, 1).toLowerCase() + "/" + + abs.getRoot().relativize(abs).toString().replaceAll("\\\\", "/"); + var winPath = b.getIdentityKey().toString().replaceAll("\\\\", "\\\\\\\\"); + var command = CommandBuilder.of() + .add("ssh") + .addQuoted(b.getUser() + "@localhost") + .add("-i") + .add("\"$(cygpath -u \"" + winPath + "\" || echo \"" + drivePath + "\")\"") + .add("-p") + .add("" + b.getPort()); + // Don't use local shell to build as it uses cygwin + var rawCommand = command.buildSimple(); + var script = ShellTemp.getLocalTempDataDirectory("mobaxpipe.sh"); + Files.writeString(Path.of(script.toString()), "#!/usr/bin/env bash\n" + rawCommand); + var fixedFile = script.toString().replaceAll("\\\\", "/").replaceAll("\\s", "\\$0"); + launch(CommandBuilder.of().add("-newtab").add(fixedFile)); } @Override diff --git a/app/src/main/java/io/xpipe/app/terminal/OhMyPoshTerminalPrompt.java b/app/src/main/java/io/xpipe/app/terminal/OhMyPoshTerminalPrompt.java index 2ca45ea0a..fee2041c3 100644 --- a/app/src/main/java/io/xpipe/app/terminal/OhMyPoshTerminalPrompt.java +++ b/app/src/main/java/io/xpipe/app/terminal/OhMyPoshTerminalPrompt.java @@ -25,11 +25,13 @@ import java.util.List; @JsonTypeName("ohmyposh") public class OhMyPoshTerminalPrompt extends ConfigFileTerminalPrompt { + @SuppressWarnings("unused") public static OptionsBuilder createOptions(Property p) { return createOptions( p, s -> OhMyPoshTerminalPrompt.builder().configuration(s).build()); } + @SuppressWarnings("unused") public static OhMyPoshTerminalPrompt createDefault() { return OhMyPoshTerminalPrompt.builder() .configuration( diff --git a/app/src/main/java/io/xpipe/app/terminal/OhMyZshTerminalPrompt.java b/app/src/main/java/io/xpipe/app/terminal/OhMyZshTerminalPrompt.java index 96fbf64b3..85167a2c6 100644 --- a/app/src/main/java/io/xpipe/app/terminal/OhMyZshTerminalPrompt.java +++ b/app/src/main/java/io/xpipe/app/terminal/OhMyZshTerminalPrompt.java @@ -25,11 +25,13 @@ import java.util.List; @JsonTypeName("ohmyzsh") public class OhMyZshTerminalPrompt extends ConfigFileTerminalPrompt { + @SuppressWarnings("unused") public static OptionsBuilder createOptions(Property p) { return createOptions( p, s -> OhMyZshTerminalPrompt.builder().configuration(s).build()); } + @SuppressWarnings("unused") public static OhMyZshTerminalPrompt createDefault() { return OhMyZshTerminalPrompt.builder() .configuration( diff --git a/app/src/main/java/io/xpipe/app/terminal/StarshipTerminalPrompt.java b/app/src/main/java/io/xpipe/app/terminal/StarshipTerminalPrompt.java index 5286b0538..913342dc8 100644 --- a/app/src/main/java/io/xpipe/app/terminal/StarshipTerminalPrompt.java +++ b/app/src/main/java/io/xpipe/app/terminal/StarshipTerminalPrompt.java @@ -26,11 +26,13 @@ import java.util.List; @JsonTypeName("starship") public class StarshipTerminalPrompt extends ConfigFileTerminalPrompt { + @SuppressWarnings("unused") public static OptionsBuilder createOptions(Property p) { return createOptions( p, s -> StarshipTerminalPrompt.builder().configuration(s).build()); } + @SuppressWarnings("unused") public static StarshipTerminalPrompt createDefault() { return StarshipTerminalPrompt.builder() .configuration( diff --git a/app/src/main/java/io/xpipe/app/terminal/TermiusTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/TermiusTerminalType.java index 91092c6ed..0dc41d4fe 100644 --- a/app/src/main/java/io/xpipe/app/terminal/TermiusTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/TermiusTerminalType.java @@ -60,23 +60,17 @@ public class TermiusTerminalType implements ExternalTerminalType { @Override public boolean isAvailable() { - try (var sc = LocalShell.getShell()) { - return switch (OsType.getLocal()) { - case OsType.Linux ignored -> { - yield Files.exists(Path.of("/opt/Termius")); - } - case OsType.MacOs ignored -> { - yield Files.exists(Path.of("/Applications/Termius.app")); - } - case OsType.Windows ignored -> { - var r = WindowsRegistry.local() - .readStringValueIfPresent(WindowsRegistry.HKEY_CURRENT_USER, "SOFTWARE\\Classes\\termius"); - yield r.isPresent(); - } - }; - } catch (Exception e) { - ErrorEventFactory.fromThrowable(e).omit().handle(); - return false; + return switch (OsType.getLocal()) { + case OsType.Linux ignored -> { + yield Files.exists(Path.of("/opt/Termius")); + } + case OsType.MacOs ignored -> { + yield Files.exists(Path.of("/Applications/Termius.app")); + } + case OsType.Windows ignored -> { + var r = WindowsRegistry.local().readStringValueIfPresent(WindowsRegistry.HKEY_CURRENT_USER, "SOFTWARE\\Classes\\termius"); + yield r.isPresent(); + } } } diff --git a/app/src/main/java/io/xpipe/app/update/AppInstaller.java b/app/src/main/java/io/xpipe/app/update/AppInstaller.java index 39671d829..6b0ddf019 100644 --- a/app/src/main/java/io/xpipe/app/update/AppInstaller.java +++ b/app/src/main/java/io/xpipe/app/update/AppInstaller.java @@ -1,9 +1,6 @@ package io.xpipe.app.update; -import io.xpipe.app.core.AppInstallation; -import io.xpipe.app.core.AppLogs; -import io.xpipe.app.core.AppNames; -import io.xpipe.app.core.AppRestart; +import io.xpipe.app.core.*; import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.process.ShellDialects; import io.xpipe.app.process.ShellScript; @@ -29,7 +26,7 @@ public class AppInstaller { } if (OsType.getLocal() == OsType.LINUX) { - return Files.exists(Path.of("/etc/debian_version")) + return AppSystemInfo.ofLinux().isDebianBased() ? new InstallerAssetType.Debian() : new InstallerAssetType.Rpm(); } diff --git a/app/src/main/java/io/xpipe/app/util/DocumentationLink.java b/app/src/main/java/io/xpipe/app/util/DocumentationLink.java index 8c7527084..91f748390 100644 --- a/app/src/main/java/io/xpipe/app/util/DocumentationLink.java +++ b/app/src/main/java/io/xpipe/app/util/DocumentationLink.java @@ -42,7 +42,6 @@ public enum DocumentationLink { SSH("guide/ssh"), SSH_HOST_KEYS("troubleshoot/ssh#no-matching-host-key-type-found"), SSH_KEX("troubleshoot/ssh#no-matching-key-exchange-method"), - SSH_PERMISSION_DENIED("troubleshoot/ssh#permission-denied"), SSH_IPV6("troubleshoot/ssh#ipv6-issues"), SSH_CONNECTION_CLOSED("troubleshoot/ssh#connection-closed-by-remote-host"), SSH_KEY_PERMISSIONS("troubleshoot/ssh#key-permissions-too-open"), diff --git a/app/src/main/java/io/xpipe/app/util/LicenseProvider.java b/app/src/main/java/io/xpipe/app/util/LicenseProvider.java index 144158d99..2f550e5c6 100644 --- a/app/src/main/java/io/xpipe/app/util/LicenseProvider.java +++ b/app/src/main/java/io/xpipe/app/util/LicenseProvider.java @@ -20,8 +20,6 @@ public abstract class LicenseProvider { public abstract String formatExceptionMessage(String name, boolean plural, LicensedFeature licensedFeature); - public abstract boolean hasLicense(); - public abstract String getLicenseId(); public abstract ObservableValue licenseTitle(); diff --git a/app/src/main/java/io/xpipe/app/util/NativeWinWindowControl.java b/app/src/main/java/io/xpipe/app/util/NativeWinWindowControl.java index fe792e5af..37b33a2bb 100644 --- a/app/src/main/java/io/xpipe/app/util/NativeWinWindowControl.java +++ b/app/src/main/java/io/xpipe/app/util/NativeWinWindowControl.java @@ -69,12 +69,6 @@ public class NativeWinWindowControl { return refs; } - public void removeBorders() { - var style = User32.INSTANCE.GetWindowLong(windowHandle, User32.GWL_STYLE); - var mod = style & ~(User32.WS_CAPTION | User32.WS_THICKFRAME | User32.WS_MAXIMIZEBOX); - User32.INSTANCE.SetWindowLong(windowHandle, User32.GWL_STYLE, mod); - } - public boolean isIconified() { return (User32.INSTANCE.GetWindowLong(windowHandle, User32.GWL_STYLE) & User32.WS_MINIMIZE) != 0; } @@ -154,6 +148,7 @@ public class NativeWinWindowControl { } } + @SuppressWarnings("unused") public enum DwmSystemBackDropType { // DWMSBT_NONE NONE(1), diff --git a/app/src/main/java/io/xpipe/app/vnc/CustomVncClient.java b/app/src/main/java/io/xpipe/app/vnc/CustomVncClient.java index 365690a2f..3598ba7c7 100644 --- a/app/src/main/java/io/xpipe/app/vnc/CustomVncClient.java +++ b/app/src/main/java/io/xpipe/app/vnc/CustomVncClient.java @@ -23,6 +23,7 @@ public class CustomVncClient implements ExternalVncClient { String command; + @SuppressWarnings("unused") static OptionsBuilder createOptions(Property property) { var command = new SimpleObjectProperty<>(property.getValue().getCommand()); return new OptionsBuilder() diff --git a/beacon/src/main/java/io/xpipe/beacon/BeaconClientException.java b/beacon/src/main/java/io/xpipe/beacon/BeaconClientException.java index 33c02e3fe..031edbb51 100644 --- a/beacon/src/main/java/io/xpipe/beacon/BeaconClientException.java +++ b/beacon/src/main/java/io/xpipe/beacon/BeaconClientException.java @@ -8,17 +8,4 @@ public class BeaconClientException extends Exception { public BeaconClientException(String message) { super(message); } - - public BeaconClientException(String message, Throwable cause) { - super(message, cause); - } - - public BeaconClientException(Throwable cause) { - super(cause); - } - - public BeaconClientException( - String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } } diff --git a/beacon/src/main/java/io/xpipe/beacon/BeaconConnectorException.java b/beacon/src/main/java/io/xpipe/beacon/BeaconConnectorException.java index 28413ca42..4511d0b7b 100644 --- a/beacon/src/main/java/io/xpipe/beacon/BeaconConnectorException.java +++ b/beacon/src/main/java/io/xpipe/beacon/BeaconConnectorException.java @@ -14,13 +14,4 @@ public class BeaconConnectorException extends Exception { public BeaconConnectorException(String message, Throwable cause) { super(message, cause); } - - public BeaconConnectorException(Throwable cause) { - super(cause); - } - - public BeaconConnectorException( - String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } } diff --git a/beacon/src/main/java/io/xpipe/beacon/BeaconServerException.java b/beacon/src/main/java/io/xpipe/beacon/BeaconServerException.java index c42769209..227b74899 100644 --- a/beacon/src/main/java/io/xpipe/beacon/BeaconServerException.java +++ b/beacon/src/main/java/io/xpipe/beacon/BeaconServerException.java @@ -16,9 +16,4 @@ public class BeaconServerException extends Exception { public BeaconServerException(Throwable cause) { super(cause); } - - public BeaconServerException( - String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } } diff --git a/core/src/main/java/io/xpipe/core/CoreJacksonModule.java b/core/src/main/java/io/xpipe/core/CoreJacksonModule.java index d4420e4bc..8a77d8ac8 100644 --- a/core/src/main/java/io/xpipe/core/CoreJacksonModule.java +++ b/core/src/main/java/io/xpipe/core/CoreJacksonModule.java @@ -114,6 +114,7 @@ public class CoreJacksonModule extends SimpleModule { @JsonSerialize(as = Throwable.class) public abstract static class ThrowableTypeMixIn { + @SuppressWarnings("unused") @JsonIdentityInfo(generator = ObjectIdGenerators.StringIdGenerator.class, property = "$id") private Throwable cause; } diff --git a/core/src/main/java/io/xpipe/core/UuidHelper.java b/core/src/main/java/io/xpipe/core/UuidHelper.java index d3b3e5649..9af17cfd7 100644 --- a/core/src/main/java/io/xpipe/core/UuidHelper.java +++ b/core/src/main/java/io/xpipe/core/UuidHelper.java @@ -12,13 +12,4 @@ public class UuidHelper { return Optional.empty(); } } - - public static Optional parse(FailableSupplier supplier) { - try { - var s = supplier.get(); - return Optional.of(UUID.fromString(s)); - } catch (Exception ex) { - return Optional.empty(); - } - } } diff --git a/ext/base/src/main/java/io/xpipe/ext/base/identity/ssh/YubikeyPivStrategy.java b/ext/base/src/main/java/io/xpipe/ext/base/identity/ssh/YubikeyPivStrategy.java index b20481849..fed5ac913 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/identity/ssh/YubikeyPivStrategy.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/identity/ssh/YubikeyPivStrategy.java @@ -25,18 +25,6 @@ import java.util.List; @AllArgsConstructor public class YubikeyPivStrategy implements SshIdentityStrategy { - public static String getDefaultSharedLibrary() { - var file = switch (OsType.getLocal()) { - case OsType.Linux ignored -> "/usr/local/lib/libykcs11.so"; - case OsType.MacOs ignored -> "/usr/local/lib/libykcs11.dylib"; - case OsType.Windows ignored -> { - var x64 = "C:\\Program Files\\Yubico\\Yubico PIV Tool\\bin\\libykcs11.dll"; - yield x64; - } - }; - return file; - } - private String getFile() { var file = switch (OsType.getLocal()) { case OsType.Linux ignored -> "/usr/local/lib/libykcs11.so";