summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2016-05-19 10:23:49 +0300
committerVaadin Code Review <review@vaadin.com>2016-05-19 07:58:41 +0000
commit47eac3cd46dbacebdee52ef39c1d13a9224029f0 (patch)
treefa719a8448333d25dd8cf6a7266c18a6c75c1b4d /shared
parent31709daa2d13fbf7b25456f8ad99053fe81daf38 (diff)
downloadvaadin-framework-47eac3cd46dbacebdee52ef39c1d13a9224029f0.tar.gz
vaadin-framework-47eac3cd46dbacebdee52ef39c1d13a9224029f0.zip
Workaround Version class to work with 7.7-SNAPSHOT
Change-Id: Iedc4f4a5869421ec465c9b169882897dd06e5eab
Diffstat (limited to 'shared')
-rw-r--r--shared/src/main/java-templates/com/vaadin/shared/Version.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/shared/src/main/java-templates/com/vaadin/shared/Version.java b/shared/src/main/java-templates/com/vaadin/shared/Version.java
index dc781f33ed..a63d68abb6 100644
--- a/shared/src/main/java-templates/com/vaadin/shared/Version.java
+++ b/shared/src/main/java-templates/com/vaadin/shared/Version.java
@@ -55,7 +55,15 @@ public class Version implements Serializable {
final String[] digits = VERSION.split("[-.]", 4);
VERSION_MAJOR = Integer.parseInt(digits[0]);
VERSION_MINOR = Integer.parseInt(digits[1]);
- VERSION_REVISION = Integer.parseInt(digits[2]);
+
+ int revision;
+ try {
+ revision = Integer.parseInt(digits[2]);
+ } catch (NumberFormatException e) {
+ revision = 0;
+ }
+ VERSION_REVISION = revision;
+
if (digits.length == 4) {
VERSION_BUILD = digits[3];
} else {