ETSI 119 602 Data Classes#547
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a890240f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return string.compareTo(other.string, ignoreCase = true) == 0 | ||
| } | ||
|
|
||
| override fun hashCode() = string.hashCode() |
There was a problem hiding this comment.
Make hashCode consistent with case-insensitive equality
equals treats MIME types case-insensitively, but hashCode uses the original case-sensitive string. This breaks the equals/hashCode contract, so equal values like "text/HTML" and "text/html" can behave incorrectly in HashSet/HashMap (duplicate entries, failed lookups), which is a real data-structure correctness bug.
Useful? React with 👍 / 👎.
| require('.' !in it) { | ||
| "Expected no second fractions, but got ${it}." | ||
| } | ||
| }.let{ | ||
| Instant.parse(it) |
There was a problem hiding this comment.
Enforce UTC "Z" suffix when deserializing ETSI instants
The deserializer only rejects fractional seconds ('.' !in it) and then calls Instant.parse, so offset timestamps without fractions (for example 2023-01-01T00:00:00+01:00) are accepted even though the class-level contract explicitly requires the UTC designator "Z". This silently accepts non-compliant input instead of failing fast.
Useful? React with 👍 / 👎.
1a89024 to
8bd564f
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
See TS 119 602