Skip to content

Commit a88515b

Browse files
committed
[java] Adding macOS Monterrey to Platforms
[skip ci]
1 parent 54c34ba commit a88515b

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

java/src/org/openqa/selenium/Platform.java

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,25 @@ public String toString() {
196196
public Platform family() {
197197
return MAC;
198198
}
199+
199200
@Override
200201
public String toString() {
201202
return "macOS 11.0";
202203
}
203204
},
204205

206+
MONTERREY("monterrey", "os x 12.0", "macos 12.0") {
207+
@Override
208+
public Platform family() {
209+
return MAC;
210+
}
211+
212+
@Override
213+
public String toString() {
214+
return "macOS 12.0";
215+
}
216+
},
217+
205218
/**
206219
* Many platforms have UNIX traits, amongst them LINUX, Solaris and BSD.
207220
*/
@@ -246,6 +259,7 @@ public boolean is(Platform compareWith) {
246259
}
247260
};
248261

262+
private static Platform current;
249263
private final String[] partOfOsName;
250264
private int minorVersion = 0;
251265
private int majorVersion = 0;
@@ -254,12 +268,6 @@ public boolean is(Platform compareWith) {
254268
this.partOfOsName = partOfOsName;
255269
}
256270

257-
public String[] getPartOfOsName() {
258-
return Arrays.copyOf(partOfOsName, partOfOsName.length);
259-
}
260-
261-
private static Platform current;
262-
263271
/**
264272
* Get current platform (not necessarily the same as operating system).
265273
*
@@ -382,6 +390,10 @@ private static boolean isBetterMatch(String previous, String matcher) {
382390
return previous == null || matcher.length() >= previous.length();
383391
}
384392

393+
public String[] getPartOfOsName() {
394+
return Arrays.copyOf(partOfOsName, partOfOsName.length);
395+
}
396+
385397
/**
386398
* Heuristic for comparing two platforms. If platforms (which is not the same thing as operating
387399
* systems) are found to be approximately similar in nature, this will return true. For instance

0 commit comments

Comments
 (0)