Skip to content

fix: fix javadoc warnings in Java sources across pekko-http modules#1119

Merged
He-Pin merged 1 commit into
apache:mainfrom
He-Pin:fix/javadoc-warnings
Jul 5, 2026
Merged

fix: fix javadoc warnings in Java sources across pekko-http modules#1119
He-Pin merged 1 commit into
apache:mainfrom
He-Pin:fix/javadoc-warnings

Conversation

@He-Pin

@He-Pin He-Pin commented Jul 4, 2026

Copy link
Copy Markdown
Member

Motivation

Running sbt doc produces javadoc warnings in Java source files across multiple pekko-http modules:

  • Multi-line {@link} tags cause "Could not find any member to link" warnings
  • Scala-style [[...]] links are not recognized by javadoc
  • Invalid link syntax like {@link Uri::port::} cannot be resolved
  • Public methods and classes missing javadoc comments

Modification

  • Authority.java: Fix invalid {@link Uri::port::} to {@link Uri#port()}
  • HttpApp.java: Replace Scala-style [[ActorSystem]] with {@link ActorSystem}, use fully qualified {@link java.lang.Throwable}
  • HttpHeader.java: Fix multi-line {@link} tag formatting
  • Multipart.java: Replace Scala-style [[...]] links with {@code}
  • CustomHeader.java, ModeledCustomHeaderFactory.java: Fix multi-line {@link} tags
  • Jackson.java (jackson & jackson3): Add javadoc to public methods
  • PetStore and SimpleServer examples: Add javadoc to public classes and methods

Result

Javadoc warnings in Java source files are eliminated, improving documentation quality.

Tests

Manually verified via sbt doc

References

Follow-up to #908

He-Pin added a commit to He-Pin/incubator-pekko-http that referenced this pull request Jul 4, 2026
Motivation:
Additional javadoc warnings found:
- Scala-style `[[...]]` links in HttpEntity, HttpMessage, HttpMethod,
  ServerSentEvent, ContentTypeResolver
- Remaining multi-line `{@link}` tags in HttpApp.java

Modification:
- Replace `[[value]]` with `{@link #value()}` in HttpMethod.java
- Replace `[[withSizeLimit]]` with `{@link #withSizeLimit(long)}` in HttpEntity.java
- Replace `[[org.apache.pekko.stream.javadsl.Source]]` with `{@code}` in HttpEntity.java and HttpMessage.java
- Replace `[[ServerSentEvent]]` with `{@link ServerSentEvent}` in ServerSentEvent.java
- Replace `[[...ContentType]]` with `{@link}` in ContentTypeResolver.java
- Fix remaining multi-line `{@link}` tags in HttpApp.java

Result:
All remaining javadoc warnings in Java sources are eliminated.

Tests:
Manually verified via grep pattern search

References:
Follow-up to apache#1119
@He-Pin He-Pin requested a review from pjfanning July 4, 2026 14:31
Motivation:
Running `sbt doc` produces javadoc and compilation warnings in Java
source files across http-core, http, and http-jackson modules:
multi-line {@link} tags, Scala-style [[...]] links, invalid link
syntax, unchecked casts, and deprecated API usage.

Modification:
- Fix invalid {@link} tags in Authority.java, HttpApp.java,
  HttpHeader.java, Multipart.java, CustomHeader.java
- Replace Scala-style [[...]] links with {@code}/{@link} in
  HttpEntity, HttpMessage, HttpMethod, ServerSentEvent, ContentTypeResolver
- Add javadoc to public methods in Jackson.java (jackson & jackson3)
  and example classes
- Add @SuppressWarnings("deprecation") to ContentTypes, Coder,
  Jackson, ParserSettingsTest
- Add @SuppressWarnings("unchecked") to AttributeKeys
- Apply javafmt to all modified Java files

Result:
All javadoc and compilation warnings in Java sources are eliminated.

Tests:
Manually verified via `sbt doc` and grep pattern search

References:
Follow-up to apache#908
@He-Pin He-Pin force-pushed the fix/javadoc-warnings branch from 671dc3c to 645882d Compare July 5, 2026 05:44

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@He-Pin He-Pin merged commit da4342b into apache:main Jul 5, 2026
5 checks passed
@He-Pin He-Pin deleted the fix/javadoc-warnings branch July 5, 2026 08:41
@pjfanning pjfanning added this to the 2.0.0-M2 milestone Jul 5, 2026
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.

2 participants