test_class.file: flink-core/src/test/java/org/apache/flink/types/JavaToValueConverterTest.java
test_class.identifier: JavaToValueConverterTest
test_case.body: @Test
  	public void testJavaToValueConversion() {
  		try {
  			assertNull(JavaToValueConverter.convertBoxedJavaType(null));
  			
  			assertEquals(new StringValue("123Test"), JavaToValueConverter.convertBoxedJavaType("123Test"));
  			assertEquals(new ByteValue((byte) 44), JavaToValueConverter.convertBoxedJavaType((byte) 44));
  			assertEquals(new ShortValue((short) 10000), JavaToValueConverter.convertBoxedJavaType((short) 10000));
  			assertEquals(new IntValue(3567564), JavaToValueConverter.convertBoxedJavaType(3567564));
  			assertEquals(new LongValue(767692734), JavaToValueConverter.convertBoxedJavaType(767692734L));
  			assertEquals(new FloatValue(17.5f), JavaToValueConverter.convertBoxedJavaType(17.5f));
  			assertEquals(new DoubleValue(3.1415926), JavaToValueConverter.convertBoxedJavaType(3.1415926));
  			assertEquals(new BooleanValue(true), JavaToValueConverter.convertBoxedJavaType(true));
  			assertEquals(new CharValue('@'), JavaToValueConverter.convertBoxedJavaType('@'));
  			
  			try {
  				JavaToValueConverter.convertBoxedJavaType(new ArrayList<Object>());
  				fail("Accepted invalid type.");
  			} catch (IllegalArgumentException e) {
  				// expected
  			}
  		}
  		catch (Exception e) {
  			e.printStackTrace();
  			fail(e.getMessage());
  		}
  	}
test_case.class_method_signature: JavaToValueConverterTest.testJavaToValueConversion()
test_case.full_signature: @Test public void testJavaToValueConversion()
test_case.identifier: testJavaToValueConversion
test_case.invocations: assertNull convertBoxedJavaType assertEquals convertBoxedJavaType assertEquals convertBoxedJavaType assertEquals convertBoxedJavaType assertEquals convertBoxedJavaType assertEquals convertBoxedJavaType assertEquals convertBoxedJavaType assertEquals convertBoxedJavaType assertEquals convertBoxedJavaType assertEquals convertBoxedJavaType convertBoxedJavaType fail printStackTrace fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testJavaToValueConversion()
focal_class.file: flink-core/src/main/java/org/apache/flink/types/JavaToValueConverter.java
focal_class.identifier: JavaToValueConverter
focal_class.class_method_signature: JavaToValueConverter.convertBoxedJavaType(Object boxed)
focal_class.full_signature: public static Value convertBoxedJavaType(Object boxed)
focal_class.identifier: convertBoxedJavaType
focal_class.modifiers: public static
focal_class.parameters: (Object boxed)
focal_class.return: Value
focal_class.signature: Value convertBoxedJavaType(Object boxed)
focal_class.class_method_signature: JavaToValueConverter.convertValueType(Value value)
focal_class.full_signature: public static Object convertValueType(Value value)
focal_class.identifier: convertValueType
focal_class.modifiers: public static
focal_class.parameters: (Value value)
focal_class.return: Object
focal_class.signature: Object convertValueType(Value value)
focal_method.body: public static Value convertBoxedJavaType(Object boxed) {
  		if (boxed == null) {
  			return null;
  		}
  		
  		final Class<?> clazz = boxed.getClass();
  		
  		if (clazz == String.class) {
  			return new StringValue((String) boxed);
  		}
  		else if (clazz == Integer.class) {
  			return new IntValue((Integer) boxed);
  		}
  		else if (clazz == Long.class) {
  			return new LongValue((Long) boxed);
  		}
  		else if (clazz == Double.class) {
  			return new DoubleValue((Double) boxed);
  		}
  		else if (clazz == Float.class) {
  			return new FloatValue((Float) boxed);
  		}
  		else if (clazz == Boolean.class) {
  			return new BooleanValue((Boolean) boxed);
  		}
  		else if (clazz == Byte.class) {
  			return new ByteValue((Byte) boxed);
  		}
  		else if (clazz == Short.class) {
  			return new ShortValue((Short) boxed);
  		}
  		else if (clazz == Character.class) {
  			return new CharValue((Character) boxed);
  		}
  		else {
  			throw new IllegalArgumentException("Object is no primitive Java type.");
  		}
  	}
focal_method.class_method_signature: JavaToValueConverter.convertBoxedJavaType(Object boxed)
focal_method.full_signature: public static Value convertBoxedJavaType(Object boxed)
focal_method.identifier: convertBoxedJavaType
focal_method.invocations: getClass
focal_method.modifiers: public static
focal_method.parameters: (Object boxed)
focal_method.return: Value
focal_method.signature: Value convertBoxedJavaType(Object boxed)