You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generated Db2Dates.parseTimestamp accepts Arabic-Indic / full-width digits in the time (Integer.parseInt) #3946
bugUnintended behavior or logic failure in the enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: lowUI tweaks, documentation, and minor optimizationsstatus: pending-releaseMerged to main, awaiting PyPI version bump
What: the generated Db2Dates.parseTimestamp reads the time part with Integer.parseInt. Integer.parseInt accepts any Unicode decimal digit, so a timestamp whose time is written in Arabic-Indic digits parses:
DB2 rejects that string: its datetime string representations take the digits 0-9 only (SQLCODE -180 / -181). The COBOL program would have got an SQL error, but the port accepts the value. This is the #3831 class of bug (Java parsers accept digits that COBOL and DB2 reject), in the one parse CobolRecords does not cover. The date part is safe: parseDate uses DateTimeFormatter, and DecimalStyle.STANDARD there reads ASCII digits only.
Found by: the Cultural Gauntlet, part 3, dimension E (#3834), --run. The generated Db2Dates runs under all 15 JVM environments, for the DB2 formats EUR, USA and ISO:
Everything else in those cells passes and is identical across the environments: the EUR/USA/ISO character forms, parsing all three DB2 formats, and NUMVAL/zoned rejecting full-width, Arabic-Indic, Thai and Devanagari digits.
Fix: check [0-9] before parseInt (as CobolRecords.isAsciiDigits does), or parse the time with a strict DateTimeFormatter.
bugUnintended behavior or logic failure in the enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: lowUI tweaks, documentation, and minor optimizationsstatus: pending-releaseMerged to main, awaiting PyPI version bump
Activity
#3834 (part 3): the Cultural Gauntlet's DB collation, input data and …
#3945 / #3946 / #3949 / #3950: generated Java reads KSDS files in key…