Woops again...
[nikiroo-utils.git] / src / be / nikiroo / utils / Version.java
index a8ec3f5b4d1fd899f8056b2b4033f1a4c234ded8..613fcfe54130ef04d4df068091d7e52a26879002 100644 (file)
@@ -40,16 +40,17 @@ public class Version {
         *            the version (<tt>MAJOR.MINOR.PATCH</tt>)
         */
        public Version(String version) {
-               this.version = version;
                try {
                        String[] tab = version.split("\\.");
                        this.major = Integer.parseInt(tab[0]);
                        this.minor = Integer.parseInt(tab[1]);
                        this.patch = Integer.parseInt(tab[2]);
+                       this.version = version;
                } catch (Exception e) {
                        this.major = 0;
                        this.minor = 0;
                        this.patch = 0;
+                       this.version = null;
                }
        }