package oslib.osx;

import java.io.Serializable;

import oslib.Arch;
import oslib.OperatingSystem;
import oslib.UnixOperatingSystem;

public class OSXOperatingSystem extends UnixOperatingSystem implements Serializable {

	private static final long serialVersionUID = 1929142018487788734L;
	
	private OSXVersion version;
	
	public OSXOperatingSystem() {
		this(OSXVersion.getFromString());
	}
	
	public OSXOperatingSystem(OSXVersion version, Arch arch) {
		super(OperatingSystem.OSX, arch);
		this.version = version;
	}
	
	public OSXOperatingSystem(OSXVersion version) {
		this(version, Arch.getArch());
	}
	
	public void setVersion(OSXVersion version) {
		this.version = version;
	}

	public OSXVersion getVersion() {
		return this.version;
	}

	@Override
	public String getDisplayString() {
		return "Mac OS X " + version.getDisplay() + " " + version.getVersion();
	}

	@Override
	public String getDetailedString() {
		return "Mac OS X " + version.getDisplay() + " " + version.getVersion();
	}

}

@@ -791,51 +791,156 @@
 %7B%0A%09%09
-return %22Mac OS X %22 + version.getDisplay()
+String s = %22Mac OS X%22;%0A%0A%09%09if (version.getDisplay() != null) %7B%0A%09%09%09s += %22 %22 + version.getDisplay();%0A%09%09%7D%0A%0A%09%09if (version.getVersion() != null) %7B%0A%09%09%09s
  +
+=
  %22 %22
@@ -960,24 +960,41 @@
 tVersion();%0A
+%09%09%7D%0A%0A%09%09return s;%0A
 %09%7D%0A%0A%09@Overri
@@ -1046,69 +1046,29 @@
 urn 
-%22Mac OS X %22 + version.getDisplay() + %22 %22 + version.getVersion
+this.getDisplayString
 ();%0A

Check for nulls (fix nullpointer on newer OSX?)