Skip to content

Commit

Permalink
fix #176 ResultSet's state of wasNull mismatch the actual situation
Browse files Browse the repository at this point in the history
  • Loading branch information
hanahmily authored and gaohongtao committed Nov 17, 2016
1 parent aee7517 commit 8e3c0ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ public Object getObject(final int columnIndex) throws SQLException {
Preconditions.checkState(null != currentRow, "After end of result set");
Preconditions.checkArgument(currentRow.inRange(columnIndex), String.format("Column Index %d out of range", columnIndex));
Object result = currentRow.getCell(columnIndex);
if (null == result) {
wasNull = true;
}
wasNull = null == result;
return result;
}

Expand All @@ -127,7 +125,6 @@ public String getString(final String columnLabel) throws SQLException {
public boolean getBoolean(final int columnIndex) throws SQLException {
Object cell = getObject(columnIndex);
if (null == cell) {
wasNull = true;
return false;
}
return (cell instanceof Boolean) ? (Boolean) cell : Boolean.valueOf(cell.toString());
Expand Down Expand Up @@ -223,7 +220,6 @@ public BigDecimal getBigDecimal(final String columnLabel) throws SQLException {
public byte[] getBytes(final int columnIndex) throws SQLException {
String value = getString(columnIndex);
if (null == value) {
wasNull = true;
return null;
}
return value.getBytes();
Expand Down Expand Up @@ -299,7 +295,6 @@ public Timestamp getTimestamp(final String columnLabel, final Calendar cal) thro
public URL getURL(final int columnIndex) throws SQLException {
String value = getString(columnIndex);
if (null == value) {
wasNull = true;
return null;
}
try {
Expand Down
13 changes: 5 additions & 8 deletions sharding-jdbc-doc/content/post/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@




+++
date = "2016-02-05T17:03:18+08:00"
title = "Release Notes"
Expand All @@ -19,12 +15,12 @@ weight = 1
[ISSUE #163](https://github.com/dangdangdotcom/sharding-jdbc/issues/163)
[ISSUE #171](https://github.com/dangdangdotcom/sharding-jdbc/issues/171)
[ISSUE #172](https://github.com/dangdangdotcom/sharding-jdbc/issues/172)

## 1.3.3


### 缺陷修正

1. [ISSUE #176](https://github.com/dangdangdotcom/sharding-jdbc/issues/176) AbstractMemoryResultSet对SQL的wasNull实现有问题

1. [ISSUE #166](https://github.com/dangdangdotcom/sharding-jdbc/issues/166) druid数据源stat过滤器多线程报错
## 1.3.3

### 功能提升

Expand All @@ -37,6 +33,7 @@ weight = 1
1. [ISSUE #122](https://github.com/dangdangdotcom/sharding-jdbc/issues/122) bed的fail重试问题
1. [ISSUE #152](https://github.com/dangdangdotcom/sharding-jdbc/issues/152) 可能同一个connection多线程导致问题
1. [ISSUE #150](https://github.com/dangdangdotcom/sharding-jdbc/issues/150) 与最新SQLserver jdbc驱动兼容问题
1. [ISSUE #166](https://github.com/dangdangdotcom/sharding-jdbc/issues/166) druid数据源stat过滤器多线程报错

## 1.3.2

Expand Down

0 comments on commit 8e3c0ee

Please sign in to comment.