Skip to content

Conversation

@tcheeric
Copy link
Owner

Summary

  • Remove redundant catch-and-rethrow blocks flagged by static analysis.
  • Reuse a single HttpClient instance in Nip05Validator instead of per-call creation.
  • Chore: bump version to 0.2.4 (x.y.z).

Changes

  • F:nostr-java-event/src/main/java/nostr/event/impl/CreateOrUpdateStallEvent.java†L49-L62: remove catch (AssertionError e) { throw e; }; preserve wrapping of non-assertion exceptions.
  • F:nostr-java-event/src/main/java/nostr/event/impl/MerchantEvent.java†L43-L56: remove catch (AssertionError e) { throw e; }; preserve wrapping of non-assertion exceptions.
  • F:nostr-java-util/src/main/java/nostr/util/validator/Nip05Validator.java†L32-L49,L82: add cached HttpClient and client() accessor; replace per-call HttpClient.newHttpClient() with reuse.
  • F:pom.xml†L6,L77: bump project + property version to 0.2.4.
  • F:nostr-java-*/pom.xml: bump module versions to 0.2.4.

Testing

  • mvn -q -DskipITs=false verify
    • Passed locally. Notable logs (tests ran, no failures):
      • Spring WebSocket client tests executed with retries and expected exceptions in tests.
      • Testcontainers pulled and started scsibug/nostr-rs-relay:latest containers successfully.

Network Access

  • No blocked domains encountered. Maven dependencies and Testcontainers images resolved successfully.

Notes

  • SLF4J no-provider warnings are informational and unchanged by this PR.
  • Mockito agent warnings are also informational and unrelated to these changes.

Protocol Compliance

  • No event schema or protocol behavior changed. Validations remain aligned with NIP-15 content expectations (stall and merchant entity checks remain intact).

@tcheeric tcheeric changed the base branch from main to develop August 31, 2025 14:10
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...main/java/nostr/util/validator/Nip05Validator.java 84.61% 0 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link

Qodana Community for JVM

192 new problems were found

Inspection name Severity Problems
Unchecked warning 🔶 Warning 61
Link specified as plain text 🔶 Warning 24
Javadoc declaration problems 🔶 Warning 22
Dangling Javadoc comment 🔶 Warning 20
Unused import 🔶 Warning 14
Deprecated API usage 🔶 Warning 11
Redundant local variable 🔶 Warning 11
Field may be 'final' 🔶 Warning 3
Redundant type cast 🔶 Warning 3
'size() == 0' can be replaced with 'isEmpty()' 🔶 Warning 2
AutoCloseable used without 'try'-with-resources 🔶 Warning 1
Caught exception is immediately rethrown 🔶 Warning 1
Class initializer may be 'static' 🔶 Warning 1
Default annotation parameter value 🔶 Warning 1
Deprecated member is still used 🔶 Warning 1
Inner class may be 'static' 🔶 Warning 1
Lombok @Getter may be used 🔶 Warning 1
@NotNull/@Nullable problems 🔶 Warning 1
Redundant type arguments 🔶 Warning 1
Redundant character escape 🔶 Warning 1
Suspicious variable/parameter name combination 🔶 Warning 1
Type parameter hides visible type 🔶 Warning 1
Unused assignment 🔶 Warning 1
Commented out code ◽️ Notice 5
Multiple occurrences of the same expression ◽️ Notice 2
@NotNull/@Nullable problems ◽️ Notice 1

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@tcheeric tcheeric marked this pull request as ready for review August 31, 2025 14:18
@tcheeric tcheeric merged commit ee41aa6 into develop Aug 31, 2025
3 checks passed
@tcheeric tcheeric deleted the refactor/rethrow-and-httpclient branch August 31, 2025 14:18
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