Clean up double semicolon code typos (#31687)
This commit is contained in:
parent
5d94003dc0
commit
31aabe4bf9
|
@ -33,7 +33,7 @@ import org.elasticsearch.index.rankeval.RatedDocument.DocumentKey;
|
|||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Result of the evaluation metric calculation on one particular query alone.
|
||||
|
|
|
@ -60,7 +60,7 @@ public class Netty4HttpPipeliningHandler extends ChannelDuplexHandler {
|
|||
|
||||
@Override
|
||||
public void write(final ChannelHandlerContext ctx, final Object msg, final ChannelPromise promise) {
|
||||
assert msg instanceof Netty4HttpResponse : "Invalid message type: " + msg.getClass();;
|
||||
assert msg instanceof Netty4HttpResponse : "Invalid message type: " + msg.getClass();
|
||||
Netty4HttpResponse response = (Netty4HttpResponse) msg;
|
||||
boolean success = false;
|
||||
try {
|
||||
|
|
|
@ -83,7 +83,7 @@ public class Netty4CorsHandler extends ChannelDuplexHandler {
|
|||
assert msg instanceof Netty4HttpResponse : "Invalid message type: " + msg.getClass();
|
||||
Netty4HttpResponse response = (Netty4HttpResponse) msg;
|
||||
setCorsResponseHeaders(response.getRequest().nettyRequest(), response, config);
|
||||
ctx.write(response, promise);;
|
||||
ctx.write(response, promise);
|
||||
}
|
||||
|
||||
public static void setCorsResponseHeaders(HttpRequest request, HttpResponse resp, Netty4CorsConfig config) {
|
||||
|
|
|
@ -161,7 +161,7 @@ final class UserAgentParser {
|
|||
}
|
||||
|
||||
public Details parse(String agentString) {
|
||||
Details details = cache.get(name, agentString);;
|
||||
Details details = cache.get(name, agentString);
|
||||
|
||||
if (details == null) {
|
||||
VersionedName userAgent = findMatch(uaPatterns, agentString);
|
||||
|
|
|
@ -56,7 +56,7 @@ public class DiskThresholdSettings {
|
|||
Setting.Property.Dynamic, Setting.Property.NodeScope);
|
||||
public static final Setting<Boolean> CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING =
|
||||
Setting.boolSetting("cluster.routing.allocation.disk.include_relocations", true,
|
||||
Setting.Property.Dynamic, Setting.Property.NodeScope);;
|
||||
Setting.Property.Dynamic, Setting.Property.NodeScope);
|
||||
public static final Setting<TimeValue> CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING =
|
||||
Setting.positiveTimeSetting("cluster.routing.allocation.disk.reroute_interval", TimeValue.timeValueSeconds(60),
|
||||
Setting.Property.Dynamic, Setting.Property.NodeScope);
|
||||
|
|
|
@ -56,7 +56,7 @@ public class CircleBuilder extends ShapeBuilder<Circle, CircleBuilder> {
|
|||
*/
|
||||
public CircleBuilder(StreamInput in) throws IOException {
|
||||
center(readFromStream(in));
|
||||
radius(in.readDouble(), DistanceUnit.readFromStream(in));;
|
||||
radius(in.readDouble(), DistanceUnit.readFromStream(in));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -75,7 +75,7 @@ class DateHistogramAggregator extends BucketsAggregator {
|
|||
this.rounding = rounding;
|
||||
this.shardRounding = shardRounding;
|
||||
this.offset = offset;
|
||||
this.order = InternalOrder.validate(order, this);;
|
||||
this.order = InternalOrder.validate(order, this);
|
||||
this.keyed = keyed;
|
||||
this.minDocCount = minDocCount;
|
||||
this.extendedBounds = extendedBounds;
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.io.IOException;
|
|||
import java.util.Collections;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.CoreMatchers.equalTo;;
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
|
||||
public class ClusterUpdateSettingsRequestTests extends ESTestCase {
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ public class QueueResizingEsThreadPoolExecutorTests extends ESTestCase {
|
|||
5000);
|
||||
|
||||
int threads = randomIntBetween(1, 5);
|
||||
int measureWindow = randomIntBetween(10, 100);;
|
||||
int measureWindow = randomIntBetween(10, 100);
|
||||
int min = randomIntBetween(4981, 4999);
|
||||
logger.info("--> auto-queue with a measurement window of {} tasks", measureWindow);
|
||||
QueueResizingEsThreadPoolExecutor executor =
|
||||
|
|
|
@ -169,7 +169,7 @@ public class PrimaryShardAllocatorTests extends ESAllocationTestCase {
|
|||
String allocId1 = randomAlphaOfLength(10);
|
||||
String allocId2 = randomAlphaOfLength(10);
|
||||
final RoutingAllocation allocation = routingAllocationWithOnePrimaryNoReplicas(yesAllocationDeciders(), CLUSTER_RECOVERED,
|
||||
allocId1, allocId2);;
|
||||
allocId1, allocId2);
|
||||
testAllocator.addData(node1, allocId1, randomBoolean(),
|
||||
new ShardLockObtainFailedException(shardId, "test"));
|
||||
testAllocator.addData(node2, allocId2, randomBoolean(), null);
|
||||
|
@ -310,7 +310,7 @@ public class PrimaryShardAllocatorTests extends ESAllocationTestCase {
|
|||
public void testFoundAllocationButNoDecider() {
|
||||
final RoutingAllocation allocation = routingAllocationWithOnePrimaryNoReplicas(noAllocationDeciders(), CLUSTER_RECOVERED,
|
||||
"allocId1");
|
||||
testAllocator.addData(node1, "allocId1", randomBoolean());;
|
||||
testAllocator.addData(node1, "allocId1", randomBoolean());
|
||||
testAllocator.allocateUnassigned(allocation);
|
||||
assertThat(allocation.routingNodesChanged(), equalTo(true));
|
||||
assertThat(allocation.routingNodes().unassigned().ignored().isEmpty(), equalTo(true));
|
||||
|
|
|
@ -162,7 +162,7 @@ public class MinDocCountIT extends AbstractTermsTestCase {
|
|||
|
||||
// check that terms2 is a subset of terms1
|
||||
private void assertSubset(Terms terms1, Terms terms2, long minDocCount, int size, String include) {
|
||||
final Matcher matcher = include == null ? null : Pattern.compile(include).matcher("");;
|
||||
final Matcher matcher = include == null ? null : Pattern.compile(include).matcher("");
|
||||
final Iterator<? extends Terms.Bucket> it1 = terms1.getBuckets().iterator();
|
||||
final Iterator<? extends Terms.Bucket> it2 = terms2.getBuckets().iterator();
|
||||
int size2 = 0;
|
||||
|
|
|
@ -1457,7 +1457,7 @@ public class CompositeAggregatorTests extends AggregatorTestCase {
|
|||
topHits = result.getBuckets().get(2).getAggregations().get("top_hits");
|
||||
assertNotNull(topHits);
|
||||
assertEquals(topHits.getHits().getHits().length, 1);
|
||||
assertEquals(topHits.getHits().getTotalHits(), 1L);;
|
||||
assertEquals(topHits.getHits().getTotalHits(), 1L);
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public class SearchWhileCreatingIndexIT extends ESIntegTestCase {
|
|||
|
||||
logger.info("using preference {}", preference);
|
||||
// we want to make sure that while recovery happens, and a replica gets recovered, its properly refreshed
|
||||
ClusterHealthStatus status = client().admin().cluster().prepareHealth("test").get().getStatus();;
|
||||
ClusterHealthStatus status = client().admin().cluster().prepareHealth("test").get().getStatus();
|
||||
while (status != ClusterHealthStatus.GREEN) {
|
||||
// first, verify that search normal search works
|
||||
SearchResponse searchResponse = client().prepareSearch("test").setQuery(QueryBuilders.termQuery("field", "test")).execute().actionGet();
|
||||
|
|
|
@ -474,7 +474,7 @@ public class InnerHitsIT extends ESIntegTestCase {
|
|||
.innerHit(new InnerHitBuilder().setFetchSourceContext(new FetchSourceContext(false)))).get();
|
||||
assertNoFailures(response);
|
||||
assertHitCount(response, 1);
|
||||
hit = response.getHits().getAt(0);;
|
||||
hit = response.getHits().getAt(0);
|
||||
assertThat(hit.getId(), equalTo("1"));
|
||||
messages = hit.getInnerHits().get("comments.messages");
|
||||
assertThat(messages.getTotalHits(), equalTo(1L));
|
||||
|
|
|
@ -40,7 +40,7 @@ import static org.elasticsearch.common.xcontent.XContentHelper.toXContent;
|
|||
import static org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken;
|
||||
import static org.elasticsearch.common.xcontent.XContentParserUtils.ensureFieldName;
|
||||
import static org.elasticsearch.test.XContentTestUtils.insertRandomFields;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertToXContentEquivalent;;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertToXContentEquivalent;
|
||||
|
||||
public class SearchProfileShardResultsTests extends ESTestCase {
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ public abstract class AbstractStreamableXContentTestCase<T extends ToXContent &
|
|||
/**
|
||||
* Parses to a new instance using the provided {@link XContentParser}
|
||||
*/
|
||||
protected abstract T doParseInstance(XContentParser parser) throws IOException;;
|
||||
protected abstract T doParseInstance(XContentParser parser) throws IOException;
|
||||
|
||||
/**
|
||||
* Indicates whether the parser supports unknown fields or not. In case it does, such behaviour will be tested by
|
||||
|
|
|
@ -40,7 +40,7 @@ import java.util.function.Predicate;
|
|||
import static org.elasticsearch.test.XContentTestUtils.insertRandomFields;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.hasItem;
|
||||
import static org.hamcrest.Matchers.instanceOf;;
|
||||
import static org.hamcrest.Matchers.instanceOf;
|
||||
|
||||
public class XContentTestUtilsTests extends ESTestCase {
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ public class GetJobsStatsAction extends Action<GetJobsStatsAction.Response> {
|
|||
|
||||
@Override
|
||||
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
||||
builder.startObject();;
|
||||
builder.startObject();
|
||||
jobsStats.doXContentBody(builder, params);
|
||||
builder.endObject();
|
||||
return builder;
|
||||
|
|
|
@ -350,7 +350,7 @@ public class HttpExporter extends Exporter {
|
|||
* @throws SettingsException if any setting is malformed or if no host is set
|
||||
*/
|
||||
private static HttpHost[] createHosts(final Config config) {
|
||||
final List<String> hosts = HOST_SETTING.getConcreteSettingForNamespace(config.name()).get(config.settings());;
|
||||
final List<String> hosts = HOST_SETTING.getConcreteSettingForNamespace(config.name()).get(config.settings());
|
||||
String configKey = HOST_SETTING.getConcreteSettingForNamespace(config.name()).getKey();
|
||||
|
||||
if (hosts.isEmpty()) {
|
||||
|
@ -446,7 +446,7 @@ public class HttpExporter extends Exporter {
|
|||
final Settings sslSettings = SSL_SETTING.getConcreteSettingForNamespace(config.name()).get(config.settings());
|
||||
final SSLIOSessionStrategy sslStrategy = sslService.sslIOSessionStrategy(sslSettings);
|
||||
final CredentialsProvider credentialsProvider = createCredentialsProvider(config);
|
||||
List<String> hostList = HOST_SETTING.getConcreteSettingForNamespace(config.name()).get(config.settings());;
|
||||
List<String> hostList = HOST_SETTING.getConcreteSettingForNamespace(config.name()).get(config.settings());
|
||||
// sending credentials in plaintext!
|
||||
if (credentialsProvider != null && hostList.stream().findFirst().orElse("").startsWith("https") == false) {
|
||||
logger.warn("exporter [{}] is not using https, but using user authentication with plaintext " +
|
||||
|
|
|
@ -130,7 +130,7 @@ public class SecurityNioTransport extends NioTransport {
|
|||
|
||||
@Override
|
||||
public NioTcpServerChannel createServerChannel(NioSelector selector, ServerSocketChannel channel) throws IOException {
|
||||
NioTcpServerChannel nioChannel = new NioTcpServerChannel(profileName, channel);;
|
||||
NioTcpServerChannel nioChannel = new NioTcpServerChannel(profileName, channel);
|
||||
Consumer<Exception> exceptionHandler = (e) -> onServerException(nioChannel, e);
|
||||
Consumer<NioSocketChannel> acceptor = SecurityNioTransport.this::acceptChannel;
|
||||
ServerChannelContext context = new ServerChannelContext(nioChannel, this, selector, acceptor, exceptionHandler);
|
||||
|
|
|
@ -142,7 +142,7 @@ public class ESNativeMigrateToolTests extends NativeRealmIntegTestCase {
|
|||
OptionParser parser = muor.getParser();
|
||||
OptionSet options = parser.parse("-u", username, "-p", password, "-U", url);
|
||||
Set<String> roles = muor.getRolesThatExist(t, settings, new Environment(settings, conf), options);
|
||||
logger.info("--> output: \n{}", t.getOutput());;
|
||||
logger.info("--> output: \n{}", t.getOutput());
|
||||
for (String r : addedRoles) {
|
||||
assertThat("expected list to contain: " + r, roles.contains(r), is(true));
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.elasticsearch.xpack.sql.util;
|
|||
import org.elasticsearch.test.ESTestCase;
|
||||
|
||||
import static org.elasticsearch.xpack.sql.util.StringUtils.likeToJavaPattern;
|
||||
import static org.elasticsearch.xpack.sql.util.StringUtils.likeToLuceneWildcard;;
|
||||
import static org.elasticsearch.xpack.sql.util.StringUtils.likeToLuceneWildcard;
|
||||
|
||||
public class LikeConversionTests extends ESTestCase {
|
||||
|
||||
|
@ -103,4 +103,4 @@ public class LikeConversionTests extends ESTestCase {
|
|||
public void testWildcardIgnoreDoubleEscapedButSkipEscapingOfSql() {
|
||||
assertEquals("foo\\\\\\*bar\\\\?\\?", wildcard("foo\\*bar\\_?"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue