Skip to content
This repository has been archived by the owner on May 29, 2018. It is now read-only.

Commit

Permalink
[PLAT-3102] Avoid NPE in HTS master
Browse files Browse the repository at this point in the history
  • Loading branch information
jodastephen committed Feb 8, 2013
1 parent a50f1d2 commit 24414c2
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -513,9 +513,9 @@ public List<HistoricalTimeSeriesInfoDocument> extractData(final ResultSet rs) th
}
final String idScheme = rs.getString("KEY_SCHEME");
final String idValue = rs.getString("KEY_VALUE");
final LocalDate validFrom = DbDateUtils.fromSqlDateNullFarPast(rs.getDate("KEY_VALID_FROM"));
final LocalDate validTo = DbDateUtils.fromSqlDateNullFarFuture(rs.getDate("KEY_VALID_TO"));
if (idScheme != null && idValue != null) {
final LocalDate validFrom = DbDateUtils.fromSqlDateNullFarPast(rs.getDate("KEY_VALID_FROM"));
final LocalDate validTo = DbDateUtils.fromSqlDateNullFarFuture(rs.getDate("KEY_VALID_TO"));
ExternalIdWithDates id = ExternalIdWithDates.of(ExternalId.of(idScheme, idValue), validFrom, validTo);
_info.setExternalIdBundle(_info.getExternalIdBundle().withExternalId(id));
}
Expand Down

0 comments on commit 24414c2

Please sign in to comment.