Handle null image in MySQL
This commit is contained in:
parent
082878aade
commit
dc66d12916
1 changed files with 5 additions and 1 deletions
|
|
@ -137,7 +137,11 @@ public class MySQLMapStorage extends MapStorage {
|
|||
rslt.format = MapType.ImageEncoding.fromOrd(rs.getInt("Format"));
|
||||
byte[] img = rs.getBytes("NewImage");
|
||||
if (img == null) img = rs.getBytes("Image");
|
||||
rslt.image = new BufferInputStream(img);
|
||||
if (img == null) {
|
||||
rslt = null;
|
||||
} else {
|
||||
rslt.image = new BufferInputStream(img);
|
||||
}
|
||||
}
|
||||
rs.close();
|
||||
stmt.close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue