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

TagDeserializer refactor #173

Merged
merged 9 commits into from
Jun 14, 2024
Merged

Conversation

avlo
Copy link
Collaborator

@avlo avlo commented Jun 13, 2024

TagDeserializer deserialization logic refactored (and cleaned up) into the following classes, which extend BaseTag (as opposed to their previously being accommodated as GenericTags).

Eachs' deserialization is now polymorphic (i.e., deserialization logic is implemented by each class as per its specific need):

  nostr-java-event/src/main/java/nostr/event/tag/EventTag.java
  nostr-java-event/src/main/java/nostr/event/tag/GeohashTag.java
  nostr-java-event/src/main/java/nostr/event/tag/HashtagTag.java
  nostr-java-event/src/main/java/nostr/event/tag/NonceTag.java
  nostr-java-event/src/main/java/nostr/event/tag/PriceTag.java
  nostr-java-event/src/main/java/nostr/event/tag/PubKeyTag.java
  nostr-java-event/src/main/java/nostr/event/tag/RelaysTag.java
  nostr-java-event/src/main/java/nostr/event/tag/SubjectTag.java

additionally:

  • GenericTag additional constructor with List parameter (as opposed to just variad String...) and cleanup.
  • unit tests for all the above

Comment/suggest/deliberation/etc on this PR are welcome, otherwise I will merge ~48hours from now (Saturday, June 15 2024, 01:15:30 2024 UTC)

@tcheeric tcheeric mentioned this pull request Jun 14, 2024
Copy link
Owner

Choose a reason for hiding this comment

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

Nice.

@tcheeric tcheeric merged commit b25ff9c into tcheeric:develop Jun 14, 2024
@tcheeric
Copy link
Owner

Merged, thanks.

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.

None yet

2 participants