From 57eda45bd73143dec4ec4bc30387908eef2ade76 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 3 Jun 2024 10:21:25 -0500 Subject: [PATCH] CLDR-17560 skip invalid report ids - in #3743, ReportId.supplemental was retired, but it occurs in some user rows - skip over invalid rows --- .../src/main/java/org/unicode/cldr/web/ReportsDB.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/cldr-apps/src/main/java/org/unicode/cldr/web/ReportsDB.java b/tools/cldr-apps/src/main/java/org/unicode/cldr/web/ReportsDB.java index 4d32562982a..df6c58907d2 100644 --- a/tools/cldr-apps/src/main/java/org/unicode/cldr/web/ReportsDB.java +++ b/tools/cldr-apps/src/main/java/org/unicode/cldr/web/ReportsDB.java @@ -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);