public static List<String> getStringList(final ResultSet rs, final String columnName) throws SQLException
    {
        final Array ary = rs.getArray(columnName);
        if (ary != null) {
            Preconditions.checkArgument(ary.getBaseType() == Types.VARCHAR || ary.getBaseType() == Types.CHAR);
            return Arrays.asList((String []) ary.getArray());
        }
        return null;
    }
public static List < String > getStringList ( final ResultSet rs , final String columnName ) throws SQLException { final Array ary = rs . getArray ( columnName ) ; if ( ary != null ) { Preconditions . checkArgument ( ary . getBaseType ( ) == Types . VARCHAR || ary . getBaseType ( ) == Types . CHAR ) ; return Arrays . asList ( ( String [ ] ) ary . getArray ( ) ) ; } return null ; }
Returns an array of Strings or null if the input is null. Null is intentional (not empty list), to be
able to distinguish between null value and empty list in the db.