You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/02/18 06:16:08 UTC

[GitHub] [shardingsphere] RaigorJiang commented on a change in pull request #15487: Fixes #15083, support more types in `getObject` method.

RaigorJiang commented on a change in pull request #15487:
URL: https://github.com/apache/shardingsphere/pull/15487#discussion_r809703365



##########
File path: shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/resultset/ShardingSphereResultSet.java
##########
@@ -367,8 +369,47 @@ public Object getObject(final String columnLabel) throws SQLException {
     @SuppressWarnings("unchecked")
     @Override
     public <T> T getObject(final int columnIndex, final Class<T> type) throws SQLException {
-        if (LocalDateTime.class.equals(type) || LocalDate.class.equals(type) || LocalTime.class.equals(type)) {
+        if (null == type) {
+            throw new SQLException("Type cannot be null");
+        }
+        if (String.class.equals(type)) {

Review comment:
       Sure, I will move it.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org