Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion java/src/org/openqa/selenium/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public static Platform getCurrent() {
* @return the most likely platform based on given operating system name
*/
public static Platform extractFromSysProperty(String osName) {
return extractFromSysProperty(osName, System.getProperty("os.version"));
return extractFromSysProperty(osName, System.getProperty("os.version", ""));
Comment thread
asolntsev marked this conversation as resolved.
}

/**
Expand All @@ -428,7 +428,9 @@ public static Platform extractFromSysProperty(String osName) {
* @return the most likely platform based on given operating system name and version
*/
public static Platform extractFromSysProperty(String osName, String osVersion) {
osName = osName == null ? "" : osName;
osName = osName.toLowerCase(Locale.ENGLISH);
osVersion = osVersion == null ? "" : osVersion;
Comment thread
asolntsev marked this conversation as resolved.
Outdated
// os.name for android is linux
if ("dalvik".equalsIgnoreCase(System.getProperty("java.vm.name"))) {
return Platform.ANDROID;
Expand Down
Loading