Author: tchemit Date: 2012-08-19 13:07:20 +0200 (Sun, 19 Aug 2012) New Revision: 2402 Url: http://nuiton.org/repositories/revision/nuiton-utils/2402 Log: refs #2275: Deprecate some codes Modified: trunk/nuiton-utils/src/main/java/org/nuiton/util/FileCompletion.java trunk/nuiton-utils/src/main/java/org/nuiton/util/ObjectUtil.java trunk/nuiton-utils/src/main/java/org/nuiton/util/Transformer.java Modified: trunk/nuiton-utils/src/main/java/org/nuiton/util/FileCompletion.java =================================================================== --- trunk/nuiton-utils/src/main/java/org/nuiton/util/FileCompletion.java 2012-08-17 13:50:06 UTC (rev 2401) +++ trunk/nuiton-utils/src/main/java/org/nuiton/util/FileCompletion.java 2012-08-19 11:07:20 UTC (rev 2402) @@ -79,7 +79,9 @@ * </p> * * @author Letellier Sylvain + * @deprecated since 2.6.12, is this very useful at the end ? don't thing so :( */ +@Deprecated public class FileCompletion { private boolean exit; Modified: trunk/nuiton-utils/src/main/java/org/nuiton/util/ObjectUtil.java =================================================================== --- trunk/nuiton-utils/src/main/java/org/nuiton/util/ObjectUtil.java 2012-08-17 13:50:06 UTC (rev 2401) +++ trunk/nuiton-utils/src/main/java/org/nuiton/util/ObjectUtil.java 2012-08-19 11:07:20 UTC (rev 2402) @@ -520,7 +520,9 @@ * * @param o Object to transform * @return the same object + * @deprecated since 2.6 (since java 5 boxing-unboxing does it for you) */ + @Deprecated public static Object toObject(Object o) { return o; } @@ -532,7 +534,9 @@ * * @param c the char to transform * @return the Charactere object corresponding + * @deprecated since 2.6 (since java 5 boxing-unboxing does it for you) */ + @Deprecated public static Object toObject(char c) { return new Character(c); } @@ -544,7 +548,9 @@ * * @param b the byte to transform * @return the byte object corresponding + * @deprecated since 2.6 (since java 5 boxing-unboxing does it for you) */ + @Deprecated public static Object toObject(byte b) { return new Byte(b); } @@ -556,7 +562,9 @@ * * @param s the short to transform * @return the Short object corresponding + * @deprecated since 2.6 (since java 5 boxing-unboxing does it for you) */ + @Deprecated public static Object toObject(short s) { return new Short(s); } @@ -568,7 +576,9 @@ * * @param i the int to transform * @return the Integer Object corresponding + * @deprecated since 2.6 (since java 5 boxing-unboxing does it for you) */ + @Deprecated public static Object toObject(int i) { return new Integer(i); } @@ -580,7 +590,9 @@ * * @param l the long to transform * @return the Long Object corresponding + * @deprecated since 2.6 (since java 5 boxing-unboxing does it for you) */ + @Deprecated public static Object toObject(long l) { return new Long(l); } @@ -592,7 +604,9 @@ * * @param f the float to transform * @return the Float Object corresponding + * @deprecated since 2.6 (since java 5 boxing-unboxing does it for you) */ + @Deprecated public static Object toObject(float f) { return new Float(f); } @@ -604,7 +618,9 @@ * * @param d the double to transform * @return the Double object corresponding + * @deprecated since 2.6 (since java 5 boxing-unboxing does it for you) */ + @Deprecated public static Object toObject(double d) { return new Double(d); } @@ -616,7 +632,9 @@ * * @param b the boolean to transform * @return the Boolean object corresponding + * @deprecated since 2.6 (since java 5 boxing-unboxing does it for you) */ + @Deprecated public static Object toObject(boolean b) { return b ? Boolean.TRUE : Boolean.FALSE; } @@ -627,8 +645,11 @@ * * @param type the type to test * @return the {@code null} value or default value for primitive types + * @see com.google.common.base.Defaults * @since 1.1.5 + * @deprecated since 2.6 (there is some other library which does it */ + @Deprecated public static Object getNullValue(Class<?> type) { if (type == null) { throw new NullPointerException("parameter 'type' can not be null"); @@ -749,7 +770,10 @@ * @param clazz la classe dont on souhaite le type primitf * @return le type primitif associé a la classe en paramètre, ou null s'il * n'y a pas de type primitif associé. + * @see com.google.common.primitives.Primitives + * @deprecated since 2.6 there is other libraty which does it */ + @Deprecated public static Class<?> getPrimitiveClass(Class<?> clazz) { if (clazz == Boolean.class) { return Boolean.TYPE; Modified: trunk/nuiton-utils/src/main/java/org/nuiton/util/Transformer.java =================================================================== --- trunk/nuiton-utils/src/main/java/org/nuiton/util/Transformer.java 2012-08-17 13:50:06 UTC (rev 2401) +++ trunk/nuiton-utils/src/main/java/org/nuiton/util/Transformer.java 2012-08-19 11:07:20 UTC (rev 2402) @@ -43,7 +43,9 @@ * * @param <E> le type de l'objet a transformer * @param <F> le type de l'objet transforme + * @deprecated since 2.6.12 (there some other library which does it guava function, commons-collection function) */ +@Deprecated public interface Transformer<E, F> extends Serializable { // Transformer F transform(E e);
participants (1)
-
tchemit@users.nuiton.org