summaryrefslogtreecommitdiffstats
path: root/shared/src
diff options
context:
space:
mode:
Diffstat (limited to 'shared/src')
-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 {