This is an automated email from the ASF dual-hosted git repository.
matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 17e30bac34 Fix: Enable to add docker instance via socket on mac with
apple silicon
new faef73873a Merge pull request #6328 from lazydan/fix-add-socket-docker
17e30bac34 is described below
commit 17e30bac34ea18d257754fa63b448749b977c430
Author: Chen Dan <[email protected]>
AuthorDate: Fri Aug 11 15:19:37 2023 +0800
Fix: Enable to add docker instance via socket on mac with apple silicon
Use AFUNIXSocket.isSupported() to check the socket support
---
.../src/org/netbeans/modules/docker/api/DockerSupport.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git
a/ide/docker.api/src/org/netbeans/modules/docker/api/DockerSupport.java
b/ide/docker.api/src/org/netbeans/modules/docker/api/DockerSupport.java
index 1cfb8074d1..0290397d22 100644
--- a/ide/docker.api/src/org/netbeans/modules/docker/api/DockerSupport.java
+++ b/ide/docker.api/src/org/netbeans/modules/docker/api/DockerSupport.java
@@ -30,7 +30,7 @@ import java.util.prefs.NodeChangeListener;
import java.util.prefs.Preferences;
import javax.swing.event.ChangeListener;
import org.netbeans.api.annotations.common.NonNull;
-import org.openide.util.BaseUtilities;
+import org.newsclub.net.unix.AFUNIXSocket;
import org.openide.util.ChangeSupport;
import org.openide.util.NbPreferences;
import org.openide.util.Parameters;
@@ -128,12 +128,7 @@ public final class DockerSupport {
}
public boolean isSocketSupported() {
- if (BaseUtilities.getOperatingSystem() != BaseUtilities.OS_LINUX
- && BaseUtilities.getOperatingSystem() != BaseUtilities.OS_MAC)
{
- return false;
- }
- String arch = System.getProperty("os.arch"); // NOI18N
- return arch != null && (arch.contains("x86") ||
arch.contains("amd64")); // NOI18N
+ return AFUNIXSocket.isSupported();
}
private boolean isInitialized() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists