Skip to content

Commit

Permalink
CLDR-17560 skip invalid report ids
Browse files Browse the repository at this point in the history
- in #3743,  ReportId.supplemental was retired, but it occurs in some user rows
- skip over invalid rows
  • Loading branch information
srl295 committed Jun 3, 2024
1 parent c1dc8c7 commit 57eda45
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@ public ReportStatus getReportStatus(Integer user, CLDRLocale locale) {
locale.getBaseName());
ResultSet rs = ps.executeQuery(); ) {
while (rs.next()) {
final String report = rs.getString("report");
final String reportStr = rs.getString("report");
ReportId report = null;
try {
report = ReportId.valueOf(report);
} catch (IllegalArgumentException iae) {
continue; // skip illegal enum values. may be a 'retired' enum
}
final Boolean completed = rs.getBoolean("completed");
final Boolean acceptable = rs.getBoolean("acceptable");
status.mark(ReportId.valueOf(report), completed, acceptable);
status.mark(report, completed, acceptable);
}
} catch (SQLException e) {
SurveyLog.logException(e, "fetching reportStatus for " + user + ":" + locale);
Expand Down

0 comments on commit 57eda45

Please sign in to comment.