nostr-java icon indicating copy to clipboard operation
nostr-java copied to clipboard

various minor updates & cleanup

Open avlo opened this issue 7 months ago • 2 comments

hi, eric. below PR consisting of minor changes/cleanup, with special note on first item:

  • GenericTag relocated from nostr.event.impl to nostr.event.tag

for any library users explicitly using GenericTag it is technically a breaking change although i suspect all/most users use concrete tag implementations (EventTag, PubKeyTag, etc) directly, which are all unchanged.

general:

  • AddressableTagFilter renamed to AddressTagFilter
  • TagSerializer split into BaseTagSerializer and GenericTagSerializer implementations
  • BaseTagSerializer and GenericTagSerializer extend newly introduced AbstractTagSerializer
  • BaseTagEncoder updated to use BaseTagSerializer
  • BaseTag.getFieldValue() potential null String result replaced with Optional<String>
  • added VoteTag & VoteTagFilter
  • GenericMessage.decode() method updated to use Stream
  • BaseMessageDecoder cleaned up
  • added VoteTagFilter to FilterableProvider
  • cleaned up SignatureDeserializer
  • OkMessage.decode() cleaned up

tests:

  • refactored common/useful test patterns into CommonTestObjectsFactory class
  • new and updated tests added for all the above, all passing
  • various gradle build/config updates

all/any concerns, questions, additional considerations, etc, welcome as always

avlo avatar Apr 29 '25 04:04 avlo

Thanks nick. I also have some changes in the pipeline. I'll work on it this weekend or earlier.

tcheeric avatar Apr 30 '25 07:04 tcheeric

yw, sounds good & thx you as well. btw, if easier/convenient for you, we can hold off on this PR until your changes are merged into develop branch, after which i'll update this PR with those changes and then merge this PR into develop branch.

avlo avatar Apr 30 '25 17:04 avlo

excellent, thx eric- btw, minor supplemental update was just pushed into develop branch as well.

avlo avatar May 16 '25 17:05 avlo