camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1431708 - in /camel/branches/camel-2.9.x: ./ camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java camel-core/src/test/java/org/apache/camel/util/ObjectHelperTest.java
Date Thu, 10 Jan 2013 22:26:50 GMT
Author: bvahdat
Date: Thu Jan 10 22:26:50 2013
New Revision: 1431708

URL: http://svn.apache.org/viewvc?rev=1431708&view=rev
Log:
Merged revisions 1431706 via svnmerge from 
https://svn.apache.org/repos/asf/camel/branches/camel-2.10.x

................
  r1431706 | bvahdat | 2013-01-10 23:25:09 +0100 (Do, 10 Jan 2013) | 9 lines
  
  Merged revisions 1431705 via svnmerge from 
  https://svn.apache.org/repos/asf/camel/trunk
  
  ........
    r1431705 | bvahdat | 2013-01-10 23:23:17 +0100 (Do, 10 Jan 2013) | 1 line
    
    CAMEL-5948: Removed ObjectHelper.isPrimitiveType() utility as it's already provided through
the java.lang.Class.isPrimitive() API itself.
  ........
................

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
    camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/util/ObjectHelperTest.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1431705
  Merged /camel/branches/camel-2.10.x:r1431706

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?rev=1431708&r1=1431707&r2=1431708&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
Thu Jan 10 22:26:50 2013
@@ -66,9 +66,6 @@ public final class ObjectHelper {
     private static final transient Logger LOG = LoggerFactory.getLogger(ObjectHelper.class);
     private static final String DEFAULT_DELIMITER = ",";
     @SuppressWarnings("unchecked")
-    private static final List<?> PRIMITIVE_TYPES = Arrays.asList(byte.class, short.class,
int.class, long.class,
-                                                                 float.class, double.class,
char.class, boolean.class, void.class);
-    @SuppressWarnings("unchecked")
     private static final List<?> PRIMITIVE_ARRAY_TYPES = Arrays.asList(byte[].class,
short[].class, int[].class, long[].class,
                                                                        float[].class, double[].class,
char[].class, boolean[].class);
 
@@ -1086,16 +1083,6 @@ public final class ObjectHelper {
     }
 
     /**
-     * Returns if the given {@code clazz} type is a Java primitive type.
-     * 
-     * @param clazz the Java type to be checked
-     * @return {@code true} if the given type is a Java primitive type
-     */
-    public static boolean isPrimitiveType(Class<?> clazz) {
-        return PRIMITIVE_TYPES.contains(clazz);
-    }
-
-    /**
      * Returns if the given {@code clazz} type is a Java primitive array type.
      * 
      * @param clazz the Java type to be checked

Modified: camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/util/ObjectHelperTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/util/ObjectHelperTest.java?rev=1431708&r1=1431707&r2=1431708&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/util/ObjectHelperTest.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/util/ObjectHelperTest.java
Thu Jan 10 22:26:50 2013
@@ -304,31 +304,6 @@ public class ObjectHelperTest extends Te
         assertFalse(it.hasNext());
     }
 
-    public void testIsPrimitiveType() {
-        assertTrue(ObjectHelper.isPrimitiveType(byte.class));
-        assertTrue(ObjectHelper.isPrimitiveType(short.class));
-        assertTrue(ObjectHelper.isPrimitiveType(int.class));
-        assertTrue(ObjectHelper.isPrimitiveType(long.class));
-        assertTrue(ObjectHelper.isPrimitiveType(float.class));
-        assertTrue(ObjectHelper.isPrimitiveType(double.class));
-        assertTrue(ObjectHelper.isPrimitiveType(char.class));
-        assertTrue(ObjectHelper.isPrimitiveType(boolean.class));
-        assertTrue(ObjectHelper.isPrimitiveType(void.class));
-
-        assertFalse(ObjectHelper.isPrimitiveType(Object.class));
-        assertFalse(ObjectHelper.isPrimitiveType(Byte.class));
-        assertFalse(ObjectHelper.isPrimitiveType(Short.class));
-        assertFalse(ObjectHelper.isPrimitiveType(Integer.class));
-        assertFalse(ObjectHelper.isPrimitiveType(Long.class));
-        assertFalse(ObjectHelper.isPrimitiveType(Float.class));
-        assertFalse(ObjectHelper.isPrimitiveType(Double.class));
-        assertFalse(ObjectHelper.isPrimitiveType(Character.class));
-        assertFalse(ObjectHelper.isPrimitiveType(Boolean.class));
-        assertFalse(ObjectHelper.isPrimitiveType(Void.class));
-        assertFalse(ObjectHelper.isPrimitiveType(CamelContext.class));
-        assertFalse(ObjectHelper.isPrimitiveType(null));
-    }
-
     public void testIsPrimitiveArrayType() {
         assertTrue(ObjectHelper.isPrimitiveArrayType(byte[].class));
         assertTrue(ObjectHelper.isPrimitiveArrayType(short[].class));



Mime
View raw message