avoid NullPointerException

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@411728 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-06-05 10:06:56 +00:00
parent 61fcd4cfd1
commit f533b42f31
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ public class OracleJDBCAdapter extends DefaultJDBCAdapter {
protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException { protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException {
// Get as a BLOB // Get as a BLOB
Blob aBlob = rs.getBlob(index); Blob aBlob = rs.getBlob(index);
if (aBlob == null) {
return null;
}
return aBlob.getBytes(1, (int) aBlob.length()); return aBlob.getBytes(1, (int) aBlob.length());
} }
} }