-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-17757: Remove Utils.mkEntry #17488
base: trunk
Are you sure you want to change the base?
KAFKA-17757: Remove Utils.mkEntry #17488
Conversation
@mingyen066 Please check the CI |
@@ -94,8 +93,8 @@ public void testFlushFailureWhenWriteToSecondaryStoreFailsForTombstoneOffsets() | |||
AtomicReference<Throwable> callbackError = new AtomicReference<>(); | |||
|
|||
Future<Void> setFuture = offsetBackingStore.set(getSerialisedOffsets(mkMap( | |||
mkEntry(OFFSET_KEY_SERIALIZED, null), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this case needs to have map carrying null value, so you can add helper for this case specifically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there are still many tests using mkEntry to create entries with null values, this PR will migrate all the code that can be converted to use Map.entry. The remaining code that still uses mkEntry will only for creating null entries.
@mingyen066 please fix conflicts |
5318b5b
to
b453825
Compare
Hi @chia7712, sorry for the late reply. I've migrated all the mkEntry usages to Map.entry, except for those used to create entries with null values. |
Updates: Since there are still many tests using mkEntry to create entries with null values, this PR will migrate all the code that can be converted to use Map.entry. The remaining code that still uses mkEntry will only for creating null entries.
Removes
Utils#mkMap
andUtils#mkEntry
as JDK 9+ allowsMap.ofEntries
andMap.entry
for creating immutable map.Utils#mkMap
will be handled in KAFKA-17820Committer Checklist (excluded from commit message)