Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ public double getDouble(int columnIndex) throws SQLException {
}

@Override
@Deprecated
@SuppressWarnings("deprecation")
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
LOG.finest("++enter++");
try {
Expand Down Expand Up @@ -470,6 +472,8 @@ public InputStream getAsciiStream(int columnIndex) throws SQLException {
}

@Override
@Deprecated
@SuppressWarnings("deprecation")
public InputStream getUnicodeStream(int columnIndex) throws SQLException {
LOG.finest("++enter++");
return getInputStream(getString(columnIndex), StandardCharsets.UTF_16LE);
Expand Down Expand Up @@ -567,6 +571,8 @@ public double getDouble(String columnLabel) throws SQLException {
}

@Override
@Deprecated
@SuppressWarnings("deprecation")
public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException {
return getBigDecimal(getColumnIndex(columnLabel), scale);
}
Expand Down Expand Up @@ -597,6 +603,8 @@ public InputStream getAsciiStream(String columnLabel) throws SQLException {
}

@Override
@Deprecated
@SuppressWarnings("deprecation")
public InputStream getUnicodeStream(String columnLabel) throws SQLException {
return getUnicodeStream(getColumnIndex(columnLabel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public BigDecimal getBigDecimal(String arg0) throws SQLException {
}

@Override
@Deprecated
@SuppressWarnings("deprecation")
public BigDecimal getBigDecimal(int arg0, int arg1) throws SQLException {
LOG.finest("++enter++");
return getBigDecimal(arg0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ public void setAsciiStream(int parameterIndex, InputStream x, int length) {
}

@Override
@Deprecated
@SuppressWarnings("deprecation")
public void setUnicodeStream(int parameterIndex, InputStream x, int length) {
// TODO :NOT IMPLEMENTED
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,15 @@ public Time coerce(Long value) {

// Note: BQ Time has a precision of up to six fractional digits (microsecond precision)
// but java.sql.Time do not. So data after seconds is not returned.
return new Time(HH, MM, SS);
// Using Calendar for timezone-safe date rollover arithmetic instead of the deprecated Time
// constructor.
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.clear();
cal.set(1970, 0, 1, 0, 0, 0);
cal.add(java.util.Calendar.HOUR, HH);
cal.add(java.util.Calendar.MINUTE, MM);
cal.add(java.util.Calendar.SECOND, SS);
return new Time(cal.getTimeInMillis());
Comment thread
Neenu1995 marked this conversation as resolved.
Outdated
}
}

Expand Down
Loading