commit | 3cf6b09f62d632e06dfce9796b9859166e9e8e08 | [log] [tgz] |
---|---|---|
author | David K. Bainbridge <dbainbri@ciena.com> | Tue Jun 07 19:13:07 2016 -0700 |
committer | David K. Bainbridge <dbainbri@ciena.com> | Wed Jun 08 08:40:58 2016 -0700 |
tree | 9890df2a30ddbb00d9591d6a3babced44f93ab5c | |
parent | dc12c93f1ecb44aa059859d8db0810d3f6d07936 [diff] |
ONOS-4674 - update the version parsing to treat everything after the last separator as a single value Change-Id: Ie4deac82c4e08eb7fccb12df7c2687a1adead889
diff --git a/core/api/src/main/java/org/onosproject/core/Version.java b/core/api/src/main/java/org/onosproject/core/Version.java index 0e2831a..aa2b41e 100644 --- a/core/api/src/main/java/org/onosproject/core/Version.java +++ b/core/api/src/main/java/org/onosproject/core/Version.java
@@ -77,7 +77,7 @@ * @return version descriptor */ public static Version version(String string) { - String[] fields = string.split("[.-]"); + String[] fields = string.split("[.-]", 4); checkArgument(fields.length >= 2, TOO_SHORT); return new Version(parseInt(fields[0]), parseInt(fields[1]), fields.length >= 3 ? fields[2] : null,