Skip to content

Commit

Permalink
Merge pull request #502 from JamieMagee/replace-bare-literals
Browse files Browse the repository at this point in the history
Replace bare literals
  • Loading branch information
AfsanehR-zz committed Oct 17, 2017
2 parents 06cb754 + 4b93851 commit e51ea73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ class GregorianChange {

GregorianCalendar cal = new GregorianCalendar(Locale.US);
cal.clear();
cal.set(1, 1, 577738, 0, 0, 0);// 577738 = 1+577737(no of days since epoch that brings us to oct 15th 1582)
cal.set(1, Calendar.FEBRUARY, 577738, 0, 0, 0);// 577738 = 1+577737(no of days since epoch that brings us to oct 15th 1582)
if (cal.get(Calendar.DAY_OF_MONTH) == 15) {
// If the date calculation is correct(the above bug is fixed),
// post the default gregorian cut over date, the pure gregorian date
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static Object getTemporalObjectFromCSVWithFormatter(String valueStrUntrimmed,
return ts;
case java.sql.Types.TIME:
// Time is returned as Timestamp to preserve nano seconds.
cal.set(connection.baseYear(), 00, 01);
cal.set(connection.baseYear(), Calendar.JANUARY, 01);
ts = new java.sql.Timestamp(cal.getTimeInMillis());
ts.setNanos(taNano);
return new java.sql.Timestamp(ts.getTime());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ public <T> T unwrap(Class<T> iface) throws SQLException {
}
catch (SQLException e) {
SQLServerException.makeFromDriverError(con, stmtParent, e.toString(), null, false);
return 0;
return parameterModeUnknown;
}
}

Expand Down Expand Up @@ -913,7 +913,7 @@ public <T> T unwrap(Class<T> iface) throws SQLException {
}
catch (SQLException e) {
SQLServerException.makeFromDriverError(con, stmtParent, e.toString(), null, false);
return 0;
return parameterNoNulls;
}
}

Expand Down

0 comments on commit e51ea73

Please sign in to comment.