aboutsummaryrefslogtreecommitdiffstats
path: root/utils/src/main/java/org/onap/policy/common/utils/validation/Version.java
diff options
context:
space:
mode:
Diffstat (limited to 'utils/src/main/java/org/onap/policy/common/utils/validation/Version.java')
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/validation/Version.java40
1 files changed, 20 insertions, 20 deletions
diff --git a/utils/src/main/java/org/onap/policy/common/utils/validation/Version.java b/utils/src/main/java/org/onap/policy/common/utils/validation/Version.java
index d8106ec6..41ff832a 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/validation/Version.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/validation/Version.java
@@ -51,6 +51,26 @@ public class Version implements Comparable<Version> {
/**
+ * String constructor.
+ *
+ * @param versionString the version string
+ */
+ public Version(@NonNull final String versionString) {
+ Version newVersion = makeVersion("String", "constructor", versionString);
+
+ if (newVersion != null) {
+ this.major = newVersion.major;
+ this.minor = newVersion.minor;
+ this.patch = newVersion.patch;
+ }
+ else {
+ this.major = 0;
+ this.minor = 0;
+ this.patch = 0;
+ }
+ }
+
+ /**
* Creates a version object.
*
* @param type type of object with which the version is associated, used when logging
@@ -84,26 +104,6 @@ public class Version implements Comparable<Version> {
}
/**
- * String constructor.
- *
- * @param versionString the version string
- */
- public Version(@NonNull final String versionString) {
- Version newVersion = makeVersion("String", "constructor", versionString);
-
- if (newVersion != null) {
- this.major = newVersion.major;
- this.minor = newVersion.minor;
- this.patch = newVersion.patch;
- }
- else {
- this.major = 0;
- this.minor = 0;
- this.patch = 0;
- }
- }
-
- /**
* Generates a new version from a string.
*
* @return a new version, of the form major.0.0, where "major" is one more than "this" version's major number