Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbae committed Jun 27, 2018
1 parent 02ef8d8 commit 523fdfe
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/test/java/com/microsoft/sqlserver/testframework/DBTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,10 @@ public Object getRowData(int colIndex,
* @return <code>true</code> if value can be passed as String for the column
*/
boolean passDataAsString(int colNum) {
return (JDBCType.CHAR == getColumn(colNum).getJdbctype() || JDBCType.VARCHAR == getColumn(colNum).getJdbctype()
|| JDBCType.NCHAR == getColumn(colNum).getJdbctype() || JDBCType.NVARCHAR == getColumn(colNum).getJdbctype()
|| JDBCType.TIMESTAMP == getColumn(colNum).getJdbctype() || JDBCType.DATE == getColumn(colNum).getJdbctype()
|| JDBCType.TIME == getColumn(colNum).getJdbctype() || JDBCType.LONGVARCHAR == getColumn(colNum).getJdbctype()
|| JDBCType.LONGNVARCHAR == getColumn(colNum).getJdbctype());
JDBCType jt = getColumn(colNum).getJdbctype();
return (JDBCType.CHAR == jt || JDBCType.VARCHAR == jt || JDBCType.NCHAR == jt || JDBCType.NVARCHAR == jt
|| JDBCType.TIMESTAMP == jt || JDBCType.DATE == jt || JDBCType.TIME == jt || JDBCType.LONGVARCHAR == jt
|| JDBCType.LONGNVARCHAR == jt);
}

/**
Expand All @@ -469,8 +468,8 @@ boolean passDataAsString(int colNum) {
*/

boolean passDataAsHex(int colNum) {
return (JDBCType.BINARY == getColumn(colNum).getJdbctype() || JDBCType.VARBINARY == getColumn(colNum).getJdbctype()
|| JDBCType.LONGVARBINARY == getColumn(colNum).getJdbctype());
JDBCType jt = getColumn(colNum).getJdbctype();
return (JDBCType.BINARY == jt || JDBCType.VARBINARY == jt || JDBCType.LONGVARBINARY == jt);
}

private String byteArrayToHex(byte[] a) {
Expand Down

0 comments on commit 523fdfe

Please sign in to comment.