Revision 9342
Added by Jing Tao about 9 years ago
src/edu/ucsb/nceas/metacat/IdentifierManager.java | ||
---|---|---|
1308 | 1308 |
stmt.setInt(13, numberReplicas); |
1309 | 1309 |
stmt.setString(14, obsoletes); |
1310 | 1310 |
stmt.setString(15, obsoletedBy); |
1311 |
stmt.setString(16, serialVersion.toString()); |
|
1311 |
if(serialVersion != null) { |
|
1312 |
stmt.setString(16, serialVersion.toString()); |
|
1313 |
} else { |
|
1314 |
stmt.setString(16, null); |
|
1315 |
} |
|
1316 |
|
|
1312 | 1317 |
stmt.setString(17, seriesId); |
1313 | 1318 |
stmt.setString(18, fileName); |
1314 | 1319 |
if (mediaType == null) { |
... | ... | |
1345 | 1350 |
} catch (Exception e) { |
1346 | 1351 |
dbConn.rollback(); |
1347 | 1352 |
dbConn.setAutoCommit(true); |
1353 |
e.printStackTrace(); |
|
1348 | 1354 |
throw new SQLException(e.getMessage()); |
1349 | 1355 |
} finally { |
1350 | 1356 |
if(stmt != null) { |
Also available in: Unified diff
Add the code to check if the serialVersion object is null before it is saved to the db.