Skip to content

[Fix] Replace Java record with nested class in ConcurrentLongHashMap (branch-4.17)#4778

Merged
merlimat merged 1 commit into
apache:branch-4.17from
eolivelli:fix-concurrentlonghashmap-record-4.17
May 7, 2026
Merged

[Fix] Replace Java record with nested class in ConcurrentLongHashMap (branch-4.17)#4778
merlimat merged 1 commit into
apache:branch-4.17from
eolivelli:fix-concurrentlonghashmap-record-4.17

Conversation

@eolivelli
Copy link
Copy Markdown
Contributor

@eolivelli eolivelli commented May 7, 2026

Fixes #4777

Summary

branch-4.17 targets Java 8 but #4771 introduced a Java record declaration in ConcurrentLongHashMap.Section, which requires Java 16+. This broke the build with:

ConcurrentLongHashMap.java:[320,29] ';' expected
ConcurrentLongHashMap.java:[320,32] illegal start of type

This change replaces the record with an equivalent static final nested class that exposes keys(), values() and capacity() accessors, leaving the existing call sites unchanged.

master is not affected because it already targets Java 17.

…pache#4777)

branch-4.17 targets Java 8, but apache#4771 introduced a Java `record`
declaration in ConcurrentLongHashMap.Section, which requires Java 16+.
This breaks the build with:

    ConcurrentLongHashMap.java:[320,29] ';' expected
    ConcurrentLongHashMap.java:[320,32] illegal start of type

Replace the record with an equivalent `static final` nested class
exposing keys(), values() and capacity() accessors so the existing
call sites are unchanged.
Copy link
Copy Markdown
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

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

Ups, my bad

@merlimat merlimat merged commit bdf8585 into apache:branch-4.17 May 7, 2026
12 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants