mirror of
https://github.com/HaraldWalker/user-agent-utils.git
synced 2026-03-13 09:23:50 +08:00
return null version on null userAgentString
otherwise you'll get NPE on matching on the version fetcher.
This commit is contained in:
@@ -427,6 +427,10 @@ public enum Browser {
|
||||
* @return Version
|
||||
*/
|
||||
public Version getVersion(String userAgentString) {
|
||||
if (userAgentString == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (versionFetcher == null) {
|
||||
return getGroup() != this ? getGroup().getVersion(userAgentString) : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user