Skip to content

Misc: revise javadoc of the misc package files - #1827

Open
Inf1mum wants to merge 1 commit into
yegor256:masterfrom
Inf1mum:fix/1749-misc-review
Open

Inf1mum wants to merge 1 commit into
yegor256:masterfrom
Inf1mum:fix/1749-misc-review

Conversation

@Inf1mum

@Inf1mum Inf1mum commented Nov 5, 2026

Copy link
Copy Markdown

Pull request solves #1749

This is a javadoc-only revision of the files listed in the revive-code-bot checklist for the org.takes.misc package plus the two org.takes.rq files from the same checklist. No code behavior is changed and no duplicate tests are added (the existing suites already cover the behavior).

What exactly is documented

  • org.takes.misc.VerboseIterator — per-method contracts: next() throws NoSuchElementException with the ctor-supplied message when the iterator is exhausted; the ctor message is rendered lazily, only when the exception is actually thrown; remove() is always unsupported (UnsupportedOperationException).
  • org.takes.misc.VerboseIterable — iterator() returns a fresh VerboseIterator on every call (repeated/concurrent iterations are independent, provided the wrapped iterable produces independent iterators), all of them carrying the same error message.
  • org.takes.rq.TempInputStream — close() contract: the temp file is deleted even if closing the wrapped stream fails, but a deletion failure replaces the stream's exception (deletion runs in finally); the file is deleted only while it still exists, so repeated close() is safe with respect to the file; read operations delegate to the wrapped stream, so their behavior after close() is determined by that stream.
  • org.takes.rq.RqSocket — all four accessors: documented that a missing X-Takes-* header fails with HttpException (HTTP 400), that port headers are parsed as integers (NumberFormatException for invalid values), and that address headers are resolved via InetAddress.getByName (literal IP is used as is, a host name would trigger a DNS lookup; normally the header carries a literal IP set by the server layer).

Reviewed without changes

  • org.takes.misc.package-info.java — the package overview already lists every class currently present in the package (Equality, Expires, Href, Opt, VerboseIterable, VerboseIterator, VerboseList); nothing to fix.
  • VerifiableIterable named in the original analysis does not exist on master and never appears in this repository's history — nothing to review.

The facets package-info files from the same checklist (ret, previous, hamcrest, forward, fork) are intentionally left out of this focused PR.

Verified

  • mvn test -Dtest='TempInputStreamTest,RqSocketTest,VerboseIterableTest,VerboseIteratorTest' — 18 tests, all green.
  • Full mvn clean install -Pqulice — BUILD SUCCESS (javadoc/Qulice checks pass).

…ream and RqSocket (solves yegor256#1749)

Signed-off-by: Inf1mum <vadim.lazuk@mail.ru>

This branch has not been deployed

No deployments
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.

1 participant