Skip to content

Conversation

@tcheeric
Copy link
Owner

Summary

  • convert Constants.Kind and Constants.Tag from interfaces to final classes with public static final fields
  • add regression tests verifying constant values and serialization

Testing

  • mvn -q verify && echo DONE

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

@tcheeric tcheeric requested a review from Copilot July 30, 2025 21:50
Copy link
Contributor

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 refactors the Constants class by converting the inner interfaces Kind and Tag to final classes with public static final fields, improving type safety and preventing implementation. It also adds comprehensive regression tests to verify constant values and serialization behavior.

  • Convert Constants.Kind and Constants.Tag from interfaces to final classes
  • Add private constructors to prevent instantiation of the constant classes
  • Include regression tests for constant values and JSON serialization

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
nostr-java-api/src/main/java/nostr/config/Constants.java Refactors inner interfaces to final classes with static final fields and private constructors
nostr-java-api/src/test/java/nostr/api/unit/ConstantsTest.java Adds new test class to verify constant values and serialization behavior

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tcheeric tcheeric merged commit 7992c21 into develop Jul 30, 2025
@tcheeric tcheeric deleted the codex/convert-constants-to-enum-types branch July 30, 2025 21:51
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.

2 participants