AttachOSHandler (@NotNull EnvironmentAwareHost host) { try { final OSType osType = computeOsType(host); if (osType == OSType.LINUX) { return new LinuxAttachOSHandler(host); } if (osType == OSType.MACOSX) { return new MacAttachOSHandler(host); } if (osType == OSType.WINDOWS) { return new GenericAttachOSHandler(host, OSType.WINDOWS); } } catch (ExecutionException e) { LOG.warn("Error while obtaining host operating system", e); } return new GenericAttachOSHandler(host, OSType.UNKNOWN); }