Skip to content

Conversation

tcheeric
Copy link
Owner

Summary

  • simplify TagSerializer by extending AbstractTagSerializer
  • move GenericTag attribute handling to applyCustomAttributes

Testing

  • mvn -q verify

https://chatgpt.com/codex/tasks/task_b_6889084e88688331b29861ca86c185d7

Copy link
Contributor

@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 refactoring simplifies the TagSerializer class by extending AbstractTagSerializer instead of directly extending StdSerializer, and moves GenericTag attribute handling logic to the applyCustomAttributes method.

  • Simplified serialization logic by leveraging inheritance from an abstract base class
  • Extracted GenericTag attribute handling to a focused override method
  • Reduced code duplication and improved maintainability

} catch (IOException e) {
throw new RuntimeException(e);
protected void applyCustomAttributes(ObjectNode node, BaseTag value) {
if (value instanceof GenericTag genericTag) {
Copy link
Preview

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

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

The pattern matching instanceof with variable declaration requires Java 16+. Consider using traditional instanceof checking for better compatibility if the project targets older Java versions.

Suggested change
if (value instanceof GenericTag genericTag) {
if (value instanceof GenericTag) {
GenericTag genericTag = (GenericTag) value;

Copilot uses AI. Check for mistakes.

@tcheeric tcheeric merged commit f8dbb90 into develop Jul 29, 2025
@tcheeric tcheeric deleted the codex/refactor-tagserializer-and-update-tests branch July 29, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant