/** Performs computation and returns the result, or throws some exception. */
public HashSet<String> call() throws Exception {
final String arch = System.getProperty("os.arch");
String name = System.getProperty("os.name").toLowerCase();
String version = System.getProperty("os.version");
if (name.equals("solaris") || name.equals("SunOS")) {
name = "solaris";
} else if (name.startsWith("windows")) {
name = "windows";
if (name.startsWith("windows 9")) {
if (version.startsWith("4.0")) {
version = "95";
} else if (version.startsWith("4.9")) {
version = "me";
} else {
assert version.startsWith("4.1");
version = "98";
}
} else {
...
I suppose Java didn't offer too many alternatives to checking the OS version the standard way, but I really have a hard time imagining MS bending over backwards to support that approach on that platform. There wasn't even a need to check for the "windows 9", the code was already checking for a Windows platform and would have worked the same without it. Avoiding confusion in the minds of the end users is still the most plausible explanation to me.
There is an example further down that thread:
https://www.reddit.com/r/technology/comments/2hwlrk/comment/...
https://issues.jenkins-ci.org/secure/attachment/18777/Platfo...