aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAdam Wagner <wbadam@users.noreply.github.com>2018-02-01 18:00:54 +0200
committerIlia Motornyi <elmot@vaadin.com>2018-02-01 18:00:54 +0200
commit875c98972e9c3da25a7c9c54cb267871921d4804 (patch)
tree8eb05e0dcf5aaf0321c96ebcbd65e53dc7b22850 /server
parent5f5a6ebfd7db9f1fc6de4a515423837280310e86 (diff)
downloadvaadin-framework-875c98972e9c3da25a7c9c54cb267871921d4804.tar.gz
vaadin-framework-875c98972e9c3da25a7c9c54cb267871921d4804.zip
Add method for getting complete browser version (#10490)
Fixes #10461
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/server/WebBrowser.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/server/WebBrowser.java b/server/src/main/java/com/vaadin/server/WebBrowser.java
index 0a5e6f2dc4..6622a0e90f 100644
--- a/server/src/main/java/com/vaadin/server/WebBrowser.java
+++ b/server/src/main/java/com/vaadin/server/WebBrowser.java
@@ -247,6 +247,20 @@ public class WebBrowser implements Serializable {
}
/**
+ * Gets the complete browser version as string. The version is given by the
+ * browser through the user agent string and usually consists of
+ * dot-separated numbers. Note that the string may contain characters other
+ * than dots and digits.
+ *
+ * @return the complete browser version or {@code null} if unknown
+ * @since
+ */
+ public String getBrowserVersion() {
+ return browserDetails != null ? browserDetails.getBrowserVersion()
+ : null;
+ }
+
+ /**
* Tests whether the user is using Linux.
*
* @return true if the user is using Linux, false if the user is not using