-
Enhancement
-
Resolution: Done
-
Major
-
4.4.3.AM2
OCBinary is suing enums for the different platform. The platform instance is chosen right when you get the instance that you want to work with:
OCBinary#getInstance
public static OCBinary getInstance() { if (SystemUtils.IS_OS_WINDOWS) { return WINDOWS; } else { return OTHER; } }
But then, latter code (that was introduced later in #getSystemPathLocation ignoring it and start being platform independent again, even setting the default to be linux:
public String getSystemPathLocation() { if (locationBinary == null) { this.locationBinary = new CommandLocationBinary("oc"); locationBinary.addPlatformLocation(Platform.OS_LINUX, OC_DEFAULTLOCATION_LINUX); locationBinary.setDefaultPlatform(Platform.OS_LINUX); } return locationBinary.findLocation(); }
Even worse is that the above code hard-codes the oc binary to be "oc" while the enum for windows is defining it as "oc.exe"
- relates to
-
JBIDE-23862 Server adapter: if "oc" in preferences is set to path with a " " (or special characters like é, à etc.) syncing fails
- Closed