mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Darwin arm64: Use NIO2 instead of legacy mediator
GitOrigin-RevId: abc952a1bf9fdbd9c79e8e196eaec5762af9673b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4229df0afd
commit
4e54b307df
@@ -87,7 +87,9 @@ public final class SystemInfo {
|
||||
|
||||
public static final boolean is32Bit = SystemInfoRt.is32Bit;
|
||||
public static final boolean is64Bit = SystemInfoRt.is64Bit;
|
||||
public static final boolean isMacIntel64 = isMac && "x86_64".equals(OS_ARCH);
|
||||
public static final boolean isIntel64 = "x86_64".equals(OS_ARCH) || "amd64".equals(OS_ARCH);
|
||||
public static final boolean isArm64 = "aarch64".equals(OS_ARCH) || "arm64".equals(OS_ARCH);
|
||||
public static final boolean isMacIntel64 = isMac && isIntel64;
|
||||
|
||||
private static final NotNullLazyValue<Boolean> ourHasXdgOpen = new PathExecLazyValue("xdg-open");
|
||||
public static boolean hasXdgOpen() {
|
||||
|
||||
@@ -54,7 +54,7 @@ public final class FileSystemUtil {
|
||||
if (SystemInfo.isWindows && IdeaWin32.isAvailable()) {
|
||||
return check(new IdeaWin32MediatorImpl());
|
||||
}
|
||||
else if ((SystemInfo.isLinux || SystemInfo.isMac || SystemInfo.isSolaris || SystemInfo.isFreeBSD) && JnaLoader.isLoaded()) {
|
||||
else if ((SystemInfo.isLinux || SystemInfo.isMac && !SystemInfo.isArm64 || SystemInfo.isSolaris || SystemInfo.isFreeBSD) && JnaLoader.isLoaded()) {
|
||||
return check(new JnaUnixMediatorImpl());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,12 @@ public abstract class FileAttributesReadingTest {
|
||||
@BeforeClass
|
||||
public static void setUpClass() {
|
||||
FileSystemUtil.resetMediator();
|
||||
assertEquals(SystemInfo.isWindows ? "IdeaWin32" : "JnaUnix", FileSystemUtil.getMediatorName());
|
||||
assertEquals(SystemInfo.isMac && SystemInfo.isArm64
|
||||
? "Nio2" // macOS arm64 only supports NIO2 mediator
|
||||
: SystemInfo.isWindows
|
||||
? "IdeaWin32"
|
||||
: "JnaUnix",
|
||||
FileSystemUtil.getMediatorName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user