diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-05-19 10:23:49 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-05-19 07:58:41 +0000 |
commit | 47eac3cd46dbacebdee52ef39c1d13a9224029f0 (patch) | |
tree | fa719a8448333d25dd8cf6a7266c18a6c75c1b4d /shared | |
parent | 31709daa2d13fbf7b25456f8ad99053fe81daf38 (diff) | |
download | vaadin-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.java | 10 |
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 { |