Skip to content
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

chore: remove deprecated methods #316

Merged
merged 3 commits into from
Mar 27, 2025
Merged

Conversation

w1am
Copy link
Contributor

@w1am w1am commented Mar 27, 2025

No description provided.

@CLAassistant
Copy link

CLAassistant commented Mar 27, 2025

CLA assistant check
All committers have signed the CLA.

@w1am w1am requested review from YoEight and Copilot March 27, 2025 13:37
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes deprecated JSON serialization methods and updates test cases to directly serialize event data using byte arrays.

  • Replace usage of deprecated methods with direct byte array serialization via ObjectMapper.
  • Update test methods to reflect the new payload type and modify exception signatures accordingly.
  • Remove deprecated methods from EventDataBuilder and EventData to streamline JSON handling.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/test/java/io/kurrent/dbclient/streams/MetadataTests.java Updated payload serialization in metadata tests
src/test/java/io/kurrent/dbclient/samples/opentelemetry/Instrumentation.java Updated JSON serialization with ObjectMapper
src/test/java/io/kurrent/dbclient/samples/appending_events/AppendingEvents.java Updated event appending methods to use ObjectMapper serialization
src/main/java/io/kurrent/dbclient/EventDataBuilder.java Removed deprecated JSON builder methods
src/main/java/io/kurrent/dbclient/EventData.java Removed deprecated JSON builder method references
Comments suppressed due to low confidence (3)

src/test/java/io/kurrent/dbclient/streams/MetadataTests.java:30

  • The test payload type was changed from a HashMap to a byte array. Verify that the test assertions and downstream consumers are updated to handle this payload format.
byte[] payload = "data".getBytes();

src/test/java/io/kurrent/dbclient/samples/appending_events/AppendingEvents.java:72

  • [nitpick] The TestEvent payload in the appendWithNoStream method was modified from 'some other value' to 'some value'. Confirm that this change is intentional to maintain the intended test scenario.
objectMapper.writeValueAsBytes(new TestEvent("2", "some value")))

src/test/java/io/kurrent/dbclient/samples/appending_events/AppendingEvents.java:102

  • [nitpick] In the concurrency test, the event id for client one changed from '1' to '2', making both client events have the same identifier. Ensure this change is deliberate as it may affect the concurrency validation logic.
objectMapper.writeValueAsBytes(new TestEvent("2", "clientOne")))

@w1am w1am merged commit 312de17 into trunk Mar 27, 2025
39 checks passed
@w1am w1am deleted the w1am/remove-deprecated-methods branch March 27, 2025 14:02
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.

3 participants