r1005 - trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/entities/metadata
Author: tchemit Date: 2008-02-15 15:45:52 +0000 (Fri, 15 Feb 2008) New Revision: 1005 Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/entities/metadata/Version.java Log: unboxing add TODO Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/entities/metadata/Version.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/entities/metadata/Version.java 2008-02-15 15:45:10 UTC (rev 1004) +++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/entities/metadata/Version.java 2008-02-15 15:45:52 UTC (rev 1005) @@ -63,7 +63,7 @@ // tokenize on dot StringTokenizer st = new StringTokenizer(version, "."); while (st.hasMoreTokens()) { - addSubVersion(Integer.valueOf(st.nextToken()).intValue()); + addSubVersion(Integer.valueOf(st.nextToken())); } } } @@ -84,6 +84,8 @@ } /** + * TODO, this is not immuable method :) modified internal state, also we + * TODO should not to this, but return a new instance of Version * Set a sub version. * * @param position @@ -99,6 +101,7 @@ } /** + * TODO as the method modified internal state, it should be at least protected * Add a new sub version. * * @param subVersion @@ -182,8 +185,8 @@ return result; } - /* (non-Javadoc) - * @see java.lang.Object#clone() + /* + * TODO suppress it if we want a immuable class */ @Override public Version clone() throws CloneNotSupportedException { @@ -194,7 +197,10 @@ return version; } - /* (non-Javadoc) + /* + * TODO when the class will be immuable, we can use super method, since + * TODO a reference of Version will be unqiue :) + * (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -204,7 +210,10 @@ .equals(((Version) o).pointedVersion)); } - /* (non-Javadoc) + /* + * TODO when the class will be immuable, we can use super method, since + * TODO a reference of Version will be unqiue :) + * (non-Javadoc) * @see java.lang.Object#hashCode() */ @Override @@ -213,6 +222,7 @@ } /** + * TODO suppress it if we want a immuable class * Safe clone. * * @return the version
participants (1)
-
tchemit@users.labs.libre-entreprise.org