Skip to content

Commit 916bf9d

Browse files
authored
Convert server javadoc to html5 (#30279)
This commit converts the remaining javadocs in :server using html4 to html5. This was mostly converting `tt` to `{@code}`.
1 parent ea35a16 commit 916bf9d

File tree

143 files changed

+390
-406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+390
-406
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

-16
Original file line numberDiff line numberDiff line change
@@ -549,22 +549,6 @@ class BuildPlugin implements Plugin<Project> {
549549
javadoc.classpath = javadoc.getClasspath().filter { f ->
550550
return classes.contains(f) == false
551551
}
552-
/*
553-
* Force html5 on projects that support it to silence the warning
554-
* that `javadoc` will change its defaults in the future.
555-
*
556-
* But not all of our javadoc is actually valid html5. So we
557-
* have to become valid incrementally. We only set html5 on the
558-
* projects we have converted so that we still get the annoying
559-
* warning on the unconverted ones. That will give us an
560-
* incentive to convert them....
561-
*/
562-
List html4Projects = [
563-
':server',
564-
]
565-
if (false == html4Projects.contains(project.path)) {
566-
javadoc.options.addBooleanOption('html5', true)
567-
}
568552
}
569553
configureJavadocJar(project)
570554
}

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ClusterConfiguration {
6464
boolean debug = false
6565

6666
/**
67-
* Configuration of the setting <tt>discovery.zen.minimum_master_nodes</tt> on the nodes.
67+
* Configuration of the setting {@code discovery.zen.minimum_master_nodes} on the nodes.
6868
* In case of more than one node, this defaults to the number of nodes
6969
*/
7070
@Input

server/src/main/java/org/apache/lucene/queries/ExtendedCommonTermsQuery.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
/**
3030
* Extended version of {@link CommonTermsQuery} that allows to pass in a
31-
* <tt>minimumNumberShouldMatch</tt> specification that uses the actual num of high frequent terms
31+
* {@code minimumNumberShouldMatch} specification that uses the actual num of high frequent terms
3232
* to calculate the minimum matching terms.
3333
*/
3434
public class ExtendedCommonTermsQuery extends CommonTermsQuery {

server/src/main/java/org/elasticsearch/ElasticsearchException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ protected String getExceptionName() {
668668
}
669669

670670
/**
671-
* Returns a underscore case name for the given exception. This method strips <tt>Elasticsearch</tt> prefixes from exception names.
671+
* Returns a underscore case name for the given exception. This method strips {@code Elasticsearch} prefixes from exception names.
672672
*/
673673
public static String getExceptionName(Throwable ex) {
674674
String simpleName = ex.getClass().getSimpleName();

server/src/main/java/org/elasticsearch/action/ShardOperationFailedException.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
public interface ShardOperationFailedException extends Streamable, ToXContent {
3232

3333
/**
34-
* The index the operation failed on. Might return <tt>null</tt> if it can't be derived.
34+
* The index the operation failed on. Might return {@code null} if it can't be derived.
3535
*/
3636
String index();
3737

3838
/**
39-
* The index the operation failed on. Might return <tt>-1</tt> if it can't be derived.
39+
* The index the operation failed on. Might return {@code -1} if it can't be derived.
4040
*/
4141
int shardId();
4242

server/src/main/java/org/elasticsearch/action/ThreadingModel.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public byte id() {
3737
}
3838

3939
/**
40-
* <tt>true</tt> if the actual operation the action represents will be executed
40+
* {@code true} if the actual operation the action represents will be executed
4141
* on a different thread than the calling thread (assuming it will be executed
4242
* on the same node).
4343
*/
@@ -46,7 +46,7 @@ public boolean threadedOperation() {
4646
}
4747

4848
/**
49-
* <tt>true</tt> if the invocation of the action result listener will be executed
49+
* {@code true} if the invocation of the action result listener will be executed
5050
* on a different thread (than the calling thread or an "expensive" thread, like the
5151
* IO thread).
5252
*/

server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public int getDelayedUnassignedShards() {
123123
}
124124

125125
/**
126-
* <tt>true</tt> if the waitForXXX has timeout out and did not match.
126+
* {@code true} if the waitForXXX has timeout out and did not match.
127127
*/
128128
public boolean isTimedOut() {
129129
return this.timedOut;

server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public ClusterRerouteRequest add(AllocationCommand... commands) {
5151
}
5252

5353
/**
54-
* Sets a dry run flag (defaults to <tt>false</tt>) allowing to run the commands without
54+
* Sets a dry run flag (defaults to {@code false}) allowing to run the commands without
5555
* actually applying them to the cluster state, and getting the resulting cluster state back.
5656
*/
5757
public ClusterRerouteRequest dryRun(boolean dryRun) {
@@ -78,7 +78,7 @@ public ClusterRerouteRequest explain(boolean explain) {
7878
}
7979

8080
/**
81-
* Sets the retry failed flag (defaults to <tt>false</tt>). If true, the
81+
* Sets the retry failed flag (defaults to {@code false}). If true, the
8282
* request will retry allocating shards that can't currently be allocated due to too many allocation failures.
8383
*/
8484
public ClusterRerouteRequest setRetryFailed(boolean retryFailed) {

server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public ClusterRerouteRequestBuilder add(AllocationCommand... commands) {
4242
}
4343

4444
/**
45-
* Sets a dry run flag (defaults to <tt>false</tt>) allowing to run the commands without
45+
* Sets a dry run flag (defaults to {@code false}) allowing to run the commands without
4646
* actually applying them to the cluster state, and getting the resulting cluster state back.
4747
*/
4848
public ClusterRerouteRequestBuilder setDryRun(boolean dryRun) {
@@ -51,7 +51,7 @@ public ClusterRerouteRequestBuilder setDryRun(boolean dryRun) {
5151
}
5252

5353
/**
54-
* Sets the explain flag (defaults to <tt>false</tt>). If true, the
54+
* Sets the explain flag (defaults to {@code false}). If true, the
5555
* request will include an explanation in addition to the cluster state.
5656
*/
5757
public ClusterRerouteRequestBuilder setExplain(boolean explain) {
@@ -60,7 +60,7 @@ public ClusterRerouteRequestBuilder setExplain(boolean explain) {
6060
}
6161

6262
/**
63-
* Sets the retry failed flag (defaults to <tt>false</tt>). If true, the
63+
* Sets the retry failed flag (defaults to {@code false}). If true, the
6464
* request will retry allocating shards that can't currently be allocated due to too many allocation failures.
6565
*/
6666
public ClusterRerouteRequestBuilder setRetryFailed(boolean retryFailed) {

server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public ClusterSearchShardsRequest routing(String... routings) {
146146

147147
/**
148148
* Sets the preference to execute the search. Defaults to randomize across shards. Can be set to
149-
* <tt>_local</tt> to prefer local shards or a custom value, which guarantees that the same order
149+
* {@code _local} to prefer local shards or a custom value, which guarantees that the same order
150150
* will be used across different requests.
151151
*/
152152
public ClusterSearchShardsRequest preference(String preference) {

server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public ClusterSearchShardsRequestBuilder setRouting(String... routing) {
5555

5656
/**
5757
* Sets the preference to execute the search. Defaults to randomize across shards. Can be set to
58-
* <tt>_local</tt> to prefer local shards or a custom value, which guarantees that the same order
58+
* {@code _local} to prefer local shards or a custom value, which guarantees that the same order
5959
* will be used across different requests.
6060
*/
6161
public ClusterSearchShardsRequestBuilder setPreference(String preference) {

server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestBuilder.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public ClusterStateRequestBuilder setBlocks(boolean filter) {
5252

5353
/**
5454
* Should the cluster state result include the {@link org.elasticsearch.cluster.metadata.MetaData}. Defaults
55-
* to <tt>true</tt>.
55+
* to {@code true}.
5656
*/
5757
public ClusterStateRequestBuilder setMetaData(boolean filter) {
5858
request.metaData(filter);
@@ -61,7 +61,7 @@ public ClusterStateRequestBuilder setMetaData(boolean filter) {
6161

6262
/**
6363
* Should the cluster state result include the {@link org.elasticsearch.cluster.node.DiscoveryNodes}. Defaults
64-
* to <tt>true</tt>.
64+
* to {@code true}.
6565
*/
6666
public ClusterStateRequestBuilder setNodes(boolean filter) {
6767
request.nodes(filter);
@@ -70,7 +70,7 @@ public ClusterStateRequestBuilder setNodes(boolean filter) {
7070

7171
/**
7272
* Should the cluster state result include the {@link org.elasticsearch.cluster.ClusterState.Custom}. Defaults
73-
* to <tt>true</tt>.
73+
* to {@code true}.
7474
*/
7575
public ClusterStateRequestBuilder setCustoms(boolean filter) {
7676
request.customs(filter);
@@ -79,7 +79,7 @@ public ClusterStateRequestBuilder setCustoms(boolean filter) {
7979

8080
/**
8181
* Should the cluster state result include the {@link org.elasticsearch.cluster.routing.RoutingTable}. Defaults
82-
* to <tt>true</tt>.
82+
* to {@code true}.
8383
*/
8484
public ClusterStateRequestBuilder setRoutingTable(boolean filter) {
8585
request.routingTable(filter);

server/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ public FlushRequest(String... indices) {
5151
}
5252

5353
/**
54-
* Returns <tt>true</tt> iff a flush should block
55-
* if a another flush operation is already running. Otherwise <tt>false</tt>
54+
* Returns {@code true} iff a flush should block
55+
* if a another flush operation is already running. Otherwise {@code false}
5656
*/
5757
public boolean waitIfOngoing() {
5858
return this.waitIfOngoing;
5959
}
6060

6161
/**
62-
* if set to <tt>true</tt> the flush will block
62+
* if set to {@code true} the flush will block
6363
* if a another flush operation is already running until the flush can be performed.
6464
* The default is <code>true</code>
6565
*/

server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequest.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
/**
2929
* A request to force merging the segments of one or more indices. In order to
30-
* run a merge on all the indices, pass an empty array or <tt>null</tt> for the
30+
* run a merge on all the indices, pass an empty array or {@code null} for the
3131
* indices.
3232
* {@link #maxNumSegments(int)} allows to control the number of segments
3333
* to force merge down to. Defaults to simply checking if a merge needs
@@ -81,30 +81,30 @@ public ForceMergeRequest maxNumSegments(int maxNumSegments) {
8181

8282
/**
8383
* Should the merge only expunge deletes from the index, without full merging.
84-
* Defaults to full merging (<tt>false</tt>).
84+
* Defaults to full merging ({@code false}).
8585
*/
8686
public boolean onlyExpungeDeletes() {
8787
return onlyExpungeDeletes;
8888
}
8989

9090
/**
9191
* Should the merge only expunge deletes from the index, without full merge.
92-
* Defaults to full merging (<tt>false</tt>).
92+
* Defaults to full merging ({@code false}).
9393
*/
9494
public ForceMergeRequest onlyExpungeDeletes(boolean onlyExpungeDeletes) {
9595
this.onlyExpungeDeletes = onlyExpungeDeletes;
9696
return this;
9797
}
9898

9999
/**
100-
* Should flush be performed after the merge. Defaults to <tt>true</tt>.
100+
* Should flush be performed after the merge. Defaults to {@code true}.
101101
*/
102102
public boolean flush() {
103103
return flush;
104104
}
105105

106106
/**
107-
* Should flush be performed after the merge. Defaults to <tt>true</tt>.
107+
* Should flush be performed after the merge. Defaults to {@code true}.
108108
*/
109109
public ForceMergeRequest flush(boolean flush) {
110110
this.flush = flush;

server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
/**
2626
* A request to force merge one or more indices. In order to force merge all
27-
* indices, pass an empty array or <tt>null</tt> for the indices.
27+
* indices, pass an empty array or {@code null} for the indices.
2828
* {@link #setMaxNumSegments(int)} allows to control the number of segments to force
2929
* merge down to. By default, will cause the force merge process to merge down
3030
* to half the configured number of segments.
@@ -47,15 +47,15 @@ public ForceMergeRequestBuilder setMaxNumSegments(int maxNumSegments) {
4747

4848
/**
4949
* Should the merge only expunge deletes from the index, without full merging.
50-
* Defaults to full merging (<tt>false</tt>).
50+
* Defaults to full merging ({@code false}).
5151
*/
5252
public ForceMergeRequestBuilder setOnlyExpungeDeletes(boolean onlyExpungeDeletes) {
5353
request.onlyExpungeDeletes(onlyExpungeDeletes);
5454
return this;
5555
}
5656

5757
/**
58-
* Should flush be performed after the merge. Defaults to <tt>true</tt>.
58+
* Should flush be performed after the merge. Defaults to {@code true}.
5959
*/
6060
public ForceMergeRequestBuilder setFlush(boolean flush) {
6161
request.flush(flush);

server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public Integer version() {
154154
}
155155

156156
/**
157-
* Set to <tt>true</tt> to force only creation, not an update of an index template. If it already
157+
* Set to {@code true} to force only creation, not an update of an index template. If it already
158158
* exists, it will fail with an {@link IllegalArgumentException}.
159159
*/
160160
public PutIndexTemplateRequest create(boolean create) {

server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public PutIndexTemplateRequestBuilder setVersion(Integer version) {
7676
}
7777

7878
/**
79-
* Set to <tt>true</tt> to force only creation, not an update of an index template. If it already
79+
* Set to {@code true} to force only creation, not an update of an index template. If it already
8080
* exists, it will fail with an {@link IllegalArgumentException}.
8181
*/
8282
public PutIndexTemplateRequestBuilder setCreate(boolean create) {

server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
/**
2929
* A request to upgrade one or more indices. In order to update all indices, pass an empty array or
30-
* <tt>null</tt> for the indices.
30+
* {@code null} for the indices.
3131
* @see org.elasticsearch.client.Requests#upgradeRequest(String...)
3232
* @see org.elasticsearch.client.IndicesAdminClient#upgrade(UpgradeRequest)
3333
* @see UpgradeResponse
@@ -67,7 +67,7 @@ public void writeTo(StreamOutput out) throws IOException {
6767

6868
/**
6969
* Should the upgrade only the ancient (older major version of Lucene) segments?
70-
* Defaults to <tt>false</tt>.
70+
* Defaults to {@code false}.
7171
*/
7272
public boolean upgradeOnlyAncientSegments() {
7373
return upgradeOnlyAncientSegments;

server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
/**
2626
* A request to upgrade one or more indices. In order to optimize on all the indices, pass an empty array or
27-
* <tt>null</tt> for the indices.
27+
* {@code null} for the indices.
2828
*/
2929
public class UpgradeRequestBuilder extends BroadcastOperationRequestBuilder<UpgradeRequest, UpgradeResponse, UpgradeRequestBuilder> {
3030

server/src/main/java/org/elasticsearch/action/bulk/BulkItemResponse.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public long getVersion() {
407407
}
408408

409409
/**
410-
* The actual response ({@link IndexResponse} or {@link DeleteResponse}). <tt>null</tt> in
410+
* The actual response ({@link IndexResponse} or {@link DeleteResponse}). {@code null} in
411411
* case of failure.
412412
*/
413413
public <T extends DocWriteResponse> T getResponse() {
@@ -422,7 +422,7 @@ public boolean isFailed() {
422422
}
423423

424424
/**
425-
* The failure message, <tt>null</tt> if it did not fail.
425+
* The failure message, {@code null} if it did not fail.
426426
*/
427427
public String getFailureMessage() {
428428
if (failure != null) {

server/src/main/java/org/elasticsearch/action/bulk/BulkProcessor.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private Builder(BiConsumer<BulkRequest, ActionListener<BulkResponse>> consumer,
100100
/**
101101
* Sets the number of concurrent requests allowed to be executed. A value of 0 means that only a single
102102
* request will be allowed to be executed. A value of 1 means 1 concurrent request is allowed to be executed
103-
* while accumulating new bulk requests. Defaults to <tt>1</tt>.
103+
* while accumulating new bulk requests. Defaults to {@code 1}.
104104
*/
105105
public Builder setConcurrentRequests(int concurrentRequests) {
106106
this.concurrentRequests = concurrentRequests;
@@ -109,7 +109,7 @@ public Builder setConcurrentRequests(int concurrentRequests) {
109109

110110
/**
111111
* Sets when to flush a new bulk request based on the number of actions currently added. Defaults to
112-
* <tt>1000</tt>. Can be set to <tt>-1</tt> to disable it.
112+
* {@code 1000}. Can be set to {@code -1} to disable it.
113113
*/
114114
public Builder setBulkActions(int bulkActions) {
115115
this.bulkActions = bulkActions;
@@ -118,7 +118,7 @@ public Builder setBulkActions(int bulkActions) {
118118

119119
/**
120120
* Sets when to flush a new bulk request based on the size of actions currently added. Defaults to
121-
* <tt>5mb</tt>. Can be set to <tt>-1</tt> to disable it.
121+
* {@code 5mb}. Can be set to {@code -1} to disable it.
122122
*/
123123
public Builder setBulkSize(ByteSizeValue bulkSize) {
124124
this.bulkSize = bulkSize;
@@ -129,7 +129,7 @@ public Builder setBulkSize(ByteSizeValue bulkSize) {
129129
* Sets a flush interval flushing *any* bulk actions pending if the interval passes. Defaults to not set.
130130
* <p>
131131
* Note, both {@link #setBulkActions(int)} and {@link #setBulkSize(org.elasticsearch.common.unit.ByteSizeValue)}
132-
* can be set to <tt>-1</tt> with the flush interval set allowing for complete async processing of bulk actions.
132+
* can be set to {@code -1} with the flush interval set allowing for complete async processing of bulk actions.
133133
*/
134134
public Builder setFlushInterval(TimeValue flushInterval) {
135135
this.flushInterval = flushInterval;

server/src/main/java/org/elasticsearch/action/bulk/BulkRequest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -493,15 +493,15 @@ public RefreshPolicy getRefreshPolicy() {
493493
}
494494

495495
/**
496-
* A timeout to wait if the index operation can't be performed immediately. Defaults to <tt>1m</tt>.
496+
* A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}.
497497
*/
498498
public final BulkRequest timeout(TimeValue timeout) {
499499
this.timeout = timeout;
500500
return this;
501501
}
502502

503503
/**
504-
* A timeout to wait if the index operation can't be performed immediately. Defaults to <tt>1m</tt>.
504+
* A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}.
505505
*/
506506
public final BulkRequest timeout(String timeout) {
507507
return timeout(TimeValue.parseTimeValue(timeout, null, getClass().getSimpleName() + ".timeout"));

0 commit comments

Comments
 (0)