You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by 温卫斌 <we...@gmail.com> on 2020/03/14 08:40:35 UTC

Re: [GitHub] [incubator-shardingsphere] funnything2014 commented on issue #4755: sharding throws NullPointerException when sql don't have sharding key and db column type is INT and its value is null

unsubscribe

GitBox <gi...@apache.org> 于 2020年3月14日周六 14:57写道:

> funnything2014 commented on issue #4755: sharding throws
> NullPointerException when sql don't have sharding key and db column type is
> INT and its value is null
> URL:
> https://github.com/apache/incubator-shardingsphere/issues/4755#issuecomment-599020484
>
>
>    I use hibernate to get my own object(some field with Int\Long\Timestamp
> type, but its default value is null), it just throw NullPointerException;
> this is not happen when sharding key is assigned.I trace the stack, and
> find in MemoryQueryResult class, private Object getRowValue(final ResultSet
> resultSet, final int columnIndex) this method,should check
> resultSet.getObject(columnIndex) whether is null and then convert to
> different type.
>
> ----------------------------------------------------------------
> This is an automated message from the Apache Git Service.
> To respond to the message, please log on to GitHub and use the
> URL above to go to the specific comment.
>
> For queries about this service, please contact Infrastructure at:
> users@infra.apache.org
>
>
> With regards,
> Apache Git Services
>