Skip to content

#7988: name the missing key instead of its hash code - #8017

Merged
yegor256 merged 2 commits into
masterfrom
7988
Sep 8, 2026
Merged

#7988: name the missing key instead of its hash code#8017
yegor256 merged 2 commits into
masterfrom
7988

Conversation

@yegor256

Copy link
Copy Markdown
Member

Closes #7988.

A caller who asked a map for a key that is not there was told

Object by hash code 96354 from given key does not exists

— broken grammar, and a polynomial hash the caller never saw standing in for the key they hold. The message is now The key three is not in the map, built from kbts, the bytes the map already dataized the key into.

Those bytes are printed with %s where they decode as UTF-8 and with %x where they do not, the two arms wrapped in recovered: %s terminates on bytes that are not UTF-8, and that termination is what selects the hexadecimal form. So a key that is not text still reports something the caller can recognise.

can-format-the-error-message-of-an-absent-key pins the text, reading the reason back through the cant-get fallback with I, the way string.at's message tests do. It asserts the new wording, so it cannot pass against master.

TestEOmap is green (22 tests) on a local mvn clean test -pl :eo-runtime -Deo.deadline=3600.


Generated by Claude Code

A caller asking for a key that is not there was told "Object by hash
code 96354 from given key does not exists": broken grammar, and a number
they never saw in place of the key they hold. The message names the key
now, as text where its bytes decode as UTF-8 and in hexadecimal where
they do not, and a test pins it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NxFBB1HWHS1xgdM6bT9Qvw
@github-actions

Copy link
Copy Markdown
Contributor

These counts changed in this branch,
while the lower each one of them, the better:

Metric master branch change
positive-tests 1808 1809 +1

They are defined in .github/workflows/counts.yml

@github-actions github-actions Bot added the counts Some counts changed in this PR label Aug 31, 2026

Copy link
Copy Markdown
Member Author

Two things a reviewer will want to know before reading the diff.

The red qulice check is not this diff. The job never reached a check: Maven could not resolve the plugin at all.

[ERROR] No plugin found for prefix 'qulice' in the current project and in the plugin groups
[…] available from the repositories [local (/home/runner/.m2/repository),
oss.sonatype.org, central]

The step runs with -Deo.skip, so no .eo file is even read by it, and the same job is green on the five sibling branches pushed in the same minutes. A re-run should clear it; I have no permission to trigger one from here.

PR #8012 covers the same issue and was opened ahead of this one. Worth picking one and closing the other rather than reviewing both.


Generated by Claude Code

@yegor256
yegor256 marked this pull request as ready for review August 31, 2026 08:36
Copilot AI lite review requested due to automatic review settings August 31, 2026 08:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copy link
Copy Markdown
Member Author

The qulice check is failing. Could you please investigate and fix the issues before this can be merged?


Generated by Claude Code

yegor256 commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

qulice is red on this PR. Not merging until CI is green.


Generated by Claude Code

yegor256 commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Not merging automatically: the qulice check is failing and the branch is behind master. Please rebase and clear qulice before merging.


Generated by Claude Code

yegor256 commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

Holding off on merging — the qulice check is failing on this PR. Requesting a look before it goes in.


Generated by Claude Code

@yegor256
yegor256 merged commit 7d325ae into master Sep 8, 2026
19 of 21 checks passed
@yegor256
yegor256 deleted the 7988 branch September 8, 2026 04:56
@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

counts Some counts changed in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

map function incorrectly reports missing key using its hash code and improper grammar

3 participants