Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #23 from andysenn/master
Removed Sometimes Unnecessary String Instantiation That Can Cause Thread Blocking
  • Loading branch information
rusher committed Jul 23, 2015
2 parents 54e624d + 04f17cc commit 59a38e3
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -313,12 +313,11 @@ public boolean getBoolean() {
}

public boolean isNull() {
String rawValue = getString();
String zeroTimestamp = "0000-00-00 00:00:00";
String zeroDate = "0000-00-00";
return (rawBytes == null
|| ((dataType == MySQLType.TIMESTAMP || dataType == MySQLType.DATETIME) && rawValue.equals(zeroTimestamp))
|| (dataType== MySQLType.DATE && rawValue.equals(zeroDate))
|| ((dataType == MySQLType.TIMESTAMP || dataType == MySQLType.DATETIME) && zeroTimestamp.equals(getString()))
|| (dataType== MySQLType.DATE && zeroDate.equals(getString()))
);
}

Expand Down

0 comments on commit 59a38e3

Please sign in to comment.