[java] Adding macOS Monterrey to Platforms
[skip ci]
@@ -196,12 +196,25 @@ public String toString() {
public Platform family() {
return MAC;
}
+
@Override
public String toString() {
return "macOS 11.0";
}
},
+ MONTERREY("monterrey", "os x 12.0", "macos 12.0") {
+ @Override
+ public Platform family() {
+ return MAC;
+ }
+
+ @Override
+ public String toString() {
+ return "macOS 12.0";
+ }
+ },
+
/**
* Many platforms have UNIX traits, amongst them LINUX, Solaris and BSD.
*/
@@ -246,6 +259,7 @@ public boolean is(Platform compareWith) {
}
};
+ private static Platform current;
private final String[] partOfOsName;
private int minorVersion = 0;
private int majorVersion = 0;
@@ -254,12 +268,6 @@ public boolean is(Platform compareWith) {
this.partOfOsName = partOfOsName;
}
- public String[] getPartOfOsName() {
- return Arrays.copyOf(partOfOsName, partOfOsName.length);
- }
-
- private static Platform current;
-
/**
* Get current platform (not necessarily the same as operating system).
*
@@ -382,6 +390,10 @@ private static boolean isBetterMatch(String previous, String matcher) {
return previous == null || matcher.length() >= previous.length();
}
+ public String[] getPartOfOsName() {
+ return Arrays.copyOf(partOfOsName, partOfOsName.length);
+ }
+
/**
* Heuristic for comparing two platforms. If platforms (which is not the same thing as operating
* systems) are found to be approximately similar in nature, this will return true. For instance
