Skip to content

Commit f9861c0

Browse files
committed
Javadoc: Use {@code}
1 parent 18d3020 commit f9861c0

10 files changed

Lines changed: 31 additions & 31 deletions

src/main/java/org/apache/commons/lang3/ClassUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ private static boolean useFull(final int runAheadTarget, final int source, final
16851685
* </p>
16861686
*
16871687
* @param classes the class array to convert, may be null or empty.
1688-
* @return an array which contains for each given class, the primitive class or <strong>null</strong> if the original class is not a wrapper class.
1688+
* @return an array which contains for each given class, the primitive class or {@code null} if the original class is not a wrapper class.
16891689
* {@code null} if null input. Empty array if an empty array passed in.
16901690
* @see #wrapperToPrimitive(Class)
16911691
* @since 2.4
@@ -1706,11 +1706,11 @@ public static Class<?>[] wrappersToPrimitives(final Class<?>... classes) {
17061706
* <p>
17071707
* This method is the counter part of {@code primitiveToWrapper()}. If the passed in class is a wrapper class for a
17081708
* primitive type, this primitive type will be returned (e.g. {@code Integer.TYPE} for {@code Integer.class}). For other
1709-
* classes, or if the parameter is <strong>null</strong>, the return value is <strong>null</strong>.
1709+
* classes, or if the parameter is {@code null}, the return value is {@code null}.
17101710
* </p>
17111711
*
1712-
* @param cls the class to convert, may be <strong>null</strong>.
1713-
* @return the corresponding primitive type if {@code cls} is a wrapper class, <strong>null</strong> otherwise.
1712+
* @param cls the class to convert, may be {@code null}.
1713+
* @return the corresponding primitive type if {@code cls} is a wrapper class, {@code null} otherwise.
17141714
* @see #primitiveToWrapper(Class)
17151715
* @since 2.4
17161716
*/

src/main/java/org/apache/commons/lang3/JavaVersion.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public enum JavaVersion {
221221
* Transforms the given string with a Java version number to the corresponding constant of this enumeration class. This method is used internally.
222222
*
223223
* @param versionStr the Java version as string.
224-
* @return the corresponding enumeration constant or <strong>null</strong> if the version is unknown.
224+
* @return the corresponding enumeration constant or {@code null} if the version is unknown.
225225
*/
226226
static JavaVersion get(final String versionStr) {
227227
if (versionStr == null) {
@@ -303,7 +303,7 @@ static JavaVersion get(final String versionStr) {
303303
* Transforms the given string with a Java version number to the corresponding constant of this enumeration class. This method is used internally.
304304
*
305305
* @param versionStr the Java version as string.
306-
* @return the corresponding enumeration constant or <strong>null</strong> if the version is unknown.
306+
* @return the corresponding enumeration constant or {@code null} if the version is unknown.
307307
*/
308308
static JavaVersion getJavaVersion(final String versionStr) {
309309
return get(versionStr);

src/main/java/org/apache/commons/lang3/concurrent/AbstractCircuitBreaker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public AbstractCircuitBreaker() {
9999
/**
100100
* Adds a change listener to this circuit breaker. This listener is notified whenever
101101
* the state of this circuit breaker changes. If the listener is
102-
* <strong>null</strong>, it is silently ignored.
102+
* {@code null}, it is silently ignored.
103103
*
104104
* @param listener the listener to be added
105105
*/

src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public T get() throws ConcurrentException {
271271
/**
272272
* Gets the {@link ExecutorService} that is actually used for executing
273273
* the background task. This method can be called after {@link #start()}
274-
* (before {@code start()} it returns <strong>null</strong>). If an external executor
274+
* (before {@code start()} it returns {@code null}). If an external executor
275275
* was set, this is also the active executor. Otherwise this method returns
276276
* the temporary executor that was created by this object.
277277
*

src/main/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public class CallableBackgroundInitializer<T> extends BackgroundInitializer<T> {
7373
* Creates a new instance of {@link CallableBackgroundInitializer} and sets
7474
* the {@link Callable} to be executed in a background thread.
7575
*
76-
* @param call the {@link Callable} (must not be <strong>null</strong>).
77-
* @throws IllegalArgumentException if the {@link Callable} is <strong>null</strong>.
76+
* @param call the {@link Callable} (must not be {@code null}).
77+
* @throws IllegalArgumentException if the {@link Callable} is {@code null}.
7878
*/
7979
public CallableBackgroundInitializer(final Callable<T> call) {
8080
checkCallable(call);
@@ -85,9 +85,9 @@ public CallableBackgroundInitializer(final Callable<T> call) {
8585
* Creates a new instance of {@link CallableBackgroundInitializer} and initializes it with the {@link Callable} to be executed in a background thread and
8686
* the {@link ExecutorService} for managing the background execution.
8787
*
88-
* @param call the {@link Callable} (must not be <strong>null</strong>).
88+
* @param call the {@link Callable} (must not be {@code null}).
8989
* @param exec an external {@link ExecutorService} to be used for task execution.
90-
* @throws IllegalArgumentException if the {@link Callable} is <strong>null</strong>.
90+
* @throws IllegalArgumentException if the {@link Callable} is {@code null}.
9191
*/
9292
public CallableBackgroundInitializer(final Callable<T> call, final ExecutorService exec) {
9393
super(exec);
@@ -99,7 +99,7 @@ public CallableBackgroundInitializer(final Callable<T> call, final ExecutorServi
9999
* Tests the passed in {@link Callable} and throws an exception if it is undefined.
100100
*
101101
* @param callable the object to check.
102-
* @throws IllegalArgumentException if the {@link Callable} is <strong>null</strong>.
102+
* @throws IllegalArgumentException if the {@link Callable} is {@code null}.
103103
*/
104104
private void checkCallable(final Callable<T> callable) {
105105
Objects.requireNonNull(callable, "callable");

src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static final class ConstantFuture<T> implements Future<T> {
4646
* Creates a new instance of {@link ConstantFuture} and initializes it
4747
* with the constant value.
4848
*
49-
* @param value the value (may be <strong>null</strong>)
49+
* @param value the value (may be {@code null})
5050
*/
5151
ConstantFuture(final T value) {
5252
this.value = value;
@@ -138,8 +138,8 @@ public static <T> Future<T> constantFuture(final T value) {
138138
* is called. With the resulting object
139139
* {@link #putIfAbsent(ConcurrentMap, Object, Object)} is called. This
140140
* handles the case that in the meantime another thread has added the key to
141-
* the map. Both the map and the initializer can be <strong>null</strong>; in this
142-
* case this method simply returns <strong>null</strong>.
141+
* the map. Both the map and the initializer can be {@code null}; in this
142+
* case this method simply returns {@code null}.
143143
*
144144
* @param <K> the type of the keys of the map
145145
* @param <V> the type of the values of the map
@@ -193,8 +193,8 @@ public static <K, V> V createIfAbsentUnchecked(final ConcurrentMap<K, V> map,
193193
* necessary. This method performs the following checks on the cause of the
194194
* passed in exception:
195195
* <ul>
196-
* <li>If the passed in exception is <strong>null</strong> or the cause is
197-
* <strong>null</strong>, this method returns <strong>null</strong>.</li>
196+
* <li>If the passed in exception is {@code null} or the cause is
197+
* {@code null}, this method returns {@code null}.</li>
198198
* <li>If the cause is a runtime exception, it is directly thrown.</li>
199199
* <li>If the cause is an error, it is directly thrown, too.</li>
200200
* <li>In any other case the cause is a checked exception. The method then
@@ -239,7 +239,7 @@ public static ConcurrentRuntimeException extractCauseUnchecked(final ExecutionEx
239239
* exception - which might already cause an unchecked exception or an error
240240
* being thrown. If the cause is a checked exception however, it is wrapped
241241
* in a {@link ConcurrentException}, which is thrown. If the passed in
242-
* exception is <strong>null</strong> or has no cause, the method simply returns
242+
* exception is {@code null} or has no cause, the method simply returns
243243
* without throwing an exception.
244244
*
245245
* @param ex the exception to be handled
@@ -277,8 +277,8 @@ public static void handleCauseUnchecked(final ExecutionException ex) {
277277
* Invokes the specified {@link ConcurrentInitializer} and returns the
278278
* object produced by the initializer. This method just invokes the {@code
279279
* get()} method of the given {@link ConcurrentInitializer}. It is
280-
* <strong>null</strong>-safe: if the argument is <strong>null</strong>, result is also
281-
* <strong>null</strong>.
280+
* {@code null}-safe: if the argument is {@code null}, result is also
281+
* {@code null}.
282282
*
283283
* @param <T> the type of the object produced by the initializer
284284
* @param initializer the {@link ConcurrentInitializer} to be invoked
@@ -332,9 +332,9 @@ public static <T> T initializeUnchecked(final ConcurrentInitializer<T> initializ
332332
* returns the value which is stored in the map.
333333
* </p>
334334
* <p>
335-
* This method is <strong>null</strong>-safe: It accepts a <strong>null</strong> map as input
335+
* This method is {@code null}-safe: It accepts a {@code null} map as input
336336
* without throwing an exception. In this case the return value is
337-
* <strong>null</strong>, too.
337+
* {@code null}, too.
338338
* </p>
339339
*
340340
* @param <K> the type of the keys of the map

src/main/java/org/apache/commons/lang3/concurrent/ConstantInitializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public class ConstantInitializer<T> implements ConcurrentInitializer<T> {
4848
* Creates a new instance of {@link ConstantInitializer} and initializes it
4949
* with the object to be managed. The {@code get()} method will always
5050
* return the object passed here. This class does not place any restrictions
51-
* on the object. It may be <strong>null</strong>, then {@code get()} will return
52-
* <strong>null</strong>, too.
51+
* on the object. It may be {@code null}, then {@code get()} will return
52+
* {@code null}, too.
5353
*
5454
* @param obj the object to be managed by this initializer
5555
*/

src/main/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ private BackgroundInitializer<?> checkName(final String name) {
152152
* Gets the {@link ConcurrentException} object that was thrown by the
153153
* {@link BackgroundInitializer} with the given name. If this
154154
* initializer did not throw an exception, the return value is
155-
* <strong>null</strong>. If the name cannot be resolved, an exception is thrown.
155+
* {@code null}. If the name cannot be resolved, an exception is thrown.
156156
*
157157
* @param name the name of the {@link BackgroundInitializer}.
158158
* @return the exception thrown by this initializer.
@@ -178,7 +178,7 @@ public BackgroundInitializer<?> getInitializer(final String name) {
178178
/**
179179
* Gets the result object produced by the {@code
180180
* BackgroundInitializer} with the given name. This is the object returned by the initializer's {@code initialize()} method. If this
181-
* {@link BackgroundInitializer} caused an exception, <strong>null</strong> is returned. If the name cannot be resolved, an exception is thrown.
181+
* {@link BackgroundInitializer} caused an exception, {@code null} is returned. If the name cannot be resolved, an exception is thrown.
182182
*
183183
* @param name the name of the {@link BackgroundInitializer}.
184184
* @return the result object produced by this {@code BackgroundInitializer}.
@@ -245,8 +245,8 @@ public MultiBackgroundInitializer(final ExecutorService exec) {
245245
* Adds a new {@link BackgroundInitializer} to this object. When this {@link MultiBackgroundInitializer} is started, the given initializer will be
246246
* processed. This method must not be called after {@link #start()} has been invoked.
247247
*
248-
* @param name the name of the initializer (must not be <strong>null</strong>).
249-
* @param backgroundInitializer the {@link BackgroundInitializer} to add (must not be <strong>null</strong>).
248+
* @param name the name of the initializer (must not be {@code null}).
249+
* @param backgroundInitializer the {@link BackgroundInitializer} to add (must not be {@code null}).
250250
* @throws NullPointerException if either {@code name} or {@code backgroundInitializer} is {@code null}.
251251
* @throws IllegalStateException if {@code start()} has already been called.
252252
*/

src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public TimedSemaphore(final long timePeriod, final TimeUnit timeUnit, final int
268268

269269
/**
270270
* Constructs a new instance of {@link TimedSemaphore} and initializes it with an executor service, the given time period, and the limit. The executor service
271-
* will be used for creating a periodic task for monitoring the time period. It can be <strong>null</strong>, then a default service will be created.
271+
* will be used for creating a periodic task for monitoring the time period. It can be {@code null}, then a default service will be created.
272272
*
273273
* @param service the executor service.
274274
* @param timePeriod the time period.

src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ public boolean replaceIn(final StringBuilder source, final int offset, final int
864864
* @param buf the buffer where the substitution is occurring, not null.
865865
* @param startPos the start position of the variable including the prefix, valid.
866866
* @param endPos the end position of the variable including the suffix, valid.
867-
* @return the variable's value or <strong>null</strong> if the variable is unknown.
867+
* @return the variable's value or {@code null} if the variable is unknown.
868868
*/
869869
protected String resolveVariable(final String variableName, final StrBuilder buf, final int startPos, final int endPos) {
870870
final StrLookup<?> resolver = getVariableResolver();

0 commit comments

Comments
 (0)