Skip to content

Commit 40ad249

Browse files
authored
fix: fix javadoc warnings in actor module Java sources (#3284)
Motivation: Running `sbt doc` produces javadoc and compilation warnings in Java source files across actor, remote, and docs modules: multi-line {@link} tags, unresolvable Scala class references, unqualified @throws references, unchecked casts, and deprecated API usage. Modification: - ReceiveBuilder.java: Move multi-line {@link} to single line - UnitMatch.java: Replace {@link scala.PartialFunction} and {@link scala.runtime.BoxedUnit} with {@code} - UnsynchronizedByteArrayInputStream.java: Use fully qualified java.lang.IllegalArgumentException in @throws tag - Replace [[...]] with {@code} in 9 package-info.java files and other Java files - Replace {@link scala.PartialFunction} with {@code} in 11 japi/pf files - Fix multi-line {@link} tags in JavaFlowSupport.java and AsyncRecoveryPlugin.java - Add @SuppressWarnings("unchecked") to OptionalUtil.scalaNone() - Add @SuppressWarnings("deprecation") to ThrottlerTransportAdapterTest and MyJavaStateStore.deleteObject(String) - Format Java files with javafmt Result: All javadoc and compilation warnings in Java sources are eliminated. Tests: - sbt "actor / compile" (no warnings) - sbt "remote / Test / compile" (no warnings) - sbt "docs / compile" (no warnings) References: Follow-up to #3254
1 parent 8a3774a commit 40ad249

25 files changed

Lines changed: 42 additions & 39 deletions

File tree

actor/src/main/java/org/apache/pekko/io/UnsynchronizedByteArrayInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public UnsynchronizedByteArrayInputStream(final byte[] data) {
9292
* @param data the buffer
9393
* @param offset the offset into the buffer
9494
* @param length the length of the buffer
95-
* @throws IllegalArgumentException if the offset or length less than zero
95+
* @throws java.lang.IllegalArgumentException if the offset or length less than zero
9696
*/
9797
public UnsynchronizedByteArrayInputStream(final byte[] data, final int offset, final int length) {
9898
requireNonNegative(offset, "offset");

actor/src/main/java/org/apache/pekko/japi/pf/AbstractMatch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import scala.PartialFunction;
1717

1818
/**
19-
* Version of {@link scala.PartialFunction} that can be built during runtime from Java.
19+
* Version of {@code scala.PartialFunction} that can be built during runtime from Java.
2020
*
2121
* @param <I> the input type, that this PartialFunction will be applied to
2222
* @param <R> the return type, that the results of the application will have
@@ -32,7 +32,7 @@ class AbstractMatch<I, R> {
3232
}
3333

3434
/**
35-
* Turn this {@link Match} into a {@link scala.PartialFunction}.
35+
* Turn this {@link Match} into a {@code scala.PartialFunction}.
3636
*
3737
* @return a partial function representation ot his {@link Match}
3838
*/

actor/src/main/java/org/apache/pekko/japi/pf/AbstractPFBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import scala.PartialFunction;
1717

1818
/**
19-
* A builder for {@link scala.PartialFunction}.
19+
* A builder for {@code scala.PartialFunction}.
2020
*
2121
* @param <F> the input type, that this PartialFunction will be applied to
2222
* @param <T> the return type, that the results of the application will have
@@ -31,7 +31,7 @@ protected void addStatement(PartialFunction<F, T> statement) {
3131
}
3232

3333
/**
34-
* Build a {@link scala.PartialFunction} from this builder. After this call the builder will be
34+
* Build a {@code scala.PartialFunction} from this builder. After this call the builder will be
3535
* reset.
3636
*
3737
* @return a PartialFunction for this builder.

actor/src/main/java/org/apache/pekko/japi/pf/FSMStateFunctionBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public FSMStateFunctionBuilder<S, D> anyEvent(final Function2<Object, D, FSM.Sta
263263
}
264264

265265
/**
266-
* Build a {@link scala.PartialFunction} from this builder. After this call the builder will be
266+
* Build a {@code scala.PartialFunction} from this builder. After this call the builder will be
267267
* reset.
268268
*
269269
* @return a PartialFunction for this builder.

actor/src/main/java/org/apache/pekko/japi/pf/FSMStopBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public void apply(FSM.StopEvent e) throws Exception {
122122
}
123123

124124
/**
125-
* Build a {@link scala.PartialFunction} from this builder. After this call the builder will be
125+
* Build a {@code scala.PartialFunction} from this builder. After this call the builder will be
126126
* reset.
127127
*
128128
* @return a PartialFunction for this builder.

actor/src/main/java/org/apache/pekko/japi/pf/FSMTransitionHandlerBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void apply(Tuple2 t) throws Exception {
9191
}
9292

9393
/**
94-
* Build a {@link scala.PartialFunction} from this builder. After this call the builder will be
94+
* Build a {@code scala.PartialFunction} from this builder. After this call the builder will be
9595
* reset.
9696
*
9797
* @return a PartialFunction for this builder.

actor/src/main/java/org/apache/pekko/japi/pf/Match.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import scala.PartialFunction;
2020

2121
/**
22-
* Version of {@link scala.PartialFunction} that can be built during runtime from Java.
22+
* Version of {@code scala.PartialFunction} that can be built during runtime from Java.
2323
*
2424
* @param <I> the input type, that this PartialFunction will be applied to
2525
* @param <R> the return type, that the results of the application will have

actor/src/main/java/org/apache/pekko/japi/pf/PFBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.apache.pekko.japi.function.Predicate;
1818

1919
/**
20-
* A builder for {@link scala.PartialFunction}.
20+
* A builder for {@code scala.PartialFunction}.
2121
*
2222
* @param <I> the input type, that this PartialFunction will be applied to
2323
* @param <R> the return type, that the results of the application will have

actor/src/main/java/org/apache/pekko/japi/pf/ReceiveBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected void addStatement(PartialFunction<Object, BoxedUnit> statement) {
5757
}
5858

5959
/**
60-
* Build a {@link scala.PartialFunction} from this builder. After this call the builder will be
60+
* Build a {@code scala.PartialFunction} from this builder. After this call the builder will be
6161
* reset.
6262
*
6363
* @return a PartialFunction for this builder.

actor/src/main/java/org/apache/pekko/japi/pf/UnitMatch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import scala.runtime.BoxedUnit;
2121

2222
/**
23-
* Version of {@link scala.PartialFunction} that can be built during runtime from Java. This is a
24-
* specialized version of {@link UnitMatch} to map java void methods to {@link
23+
* Version of {@code scala.PartialFunction} that can be built during runtime from Java. This is a
24+
* specialized version of {@link UnitMatch} to map java void methods to {@code
2525
* scala.runtime.BoxedUnit}.
2626
*
2727
* @param <I> the input type, that this PartialFunction will be applied to

0 commit comments

Comments
 (0)