@Test public void testToArray_EmptyString() throws SQLException { Array emptyArray = converter.toArray(""); assertEquals(0, ((Object[]) emptyArray.getArray()).length); }
public Array toArray(String input) throws SQLException { if (input == null || input.isEmpty()) { return conn.createArrayOf(elementDataType.getSqlTypeName(), new Object[0]); } return conn.createArrayOf( elementDataType.getSqlTypeName(), Lists.newArrayList( Iterables.transform( splitter.split(input), elementConvertFunction)).toArray()); }
StringToArrayConverter { public Array toArray(String input) throws SQLException { if (input == null || input.isEmpty()) { return conn.createArrayOf(elementDataType.getSqlTypeName(), new Object[0]); } return conn.createArrayOf( elementDataType.getSqlTypeName(), Lists.newArrayList( Iterables.transform( splitter.split(input), elementConvertFunction)).toArray()); } }
StringToArrayConverter { public Array toArray(String input) throws SQLException { if (input == null || input.isEmpty()) { return conn.createArrayOf(elementDataType.getSqlTypeName(), new Object[0]); } return conn.createArrayOf( elementDataType.getSqlTypeName(), Lists.newArrayList( Iterables.transform( splitter.split(input), elementConvertFunction)).toArray()); } StringToArrayConverter(Connection conn, String separatorString,
            PDataType elementDataType); }
StringToArrayConverter { public Array toArray(String input) throws SQLException { if (input == null || input.isEmpty()) { return conn.createArrayOf(elementDataType.getSqlTypeName(), new Object[0]); } return conn.createArrayOf( elementDataType.getSqlTypeName(), Lists.newArrayList( Iterables.transform( splitter.split(input), elementConvertFunction)).toArray()); } StringToArrayConverter(Connection conn, String separatorString,
            PDataType elementDataType); Array toArray(String input); }
StringToArrayConverter { public Array toArray(String input) throws SQLException { if (input == null || input.isEmpty()) { return conn.createArrayOf(elementDataType.getSqlTypeName(), new Object[0]); } return conn.createArrayOf( elementDataType.getSqlTypeName(), Lists.newArrayList( Iterables.transform( splitter.split(input), elementConvertFunction)).toArray()); } StringToArrayConverter(Connection conn, String separatorString,
            PDataType elementDataType); Array toArray(String input);  }