Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Review SolrJ code for typos (#2656)

Eric Pugh9589cbc2338c
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/FastStreamingDocsCallback.java b/solr/solrj/src/java/org/apache/solr/client/solrj/FastStreamingDocsCallback.java
index 8398a13f562..cb5a7967747 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/FastStreamingDocsCallback.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/FastStreamingDocsCallback.java
@@ -40,7 +40,7 @@ public interface FastStreamingDocsCallback {
Object startDoc(Object docListObj);
/**
- * FOund a new field
+ * Found a new field
*
* @param field Read the appropriate value
* @param docObj The object returned by {{@link #startDoc(Object)}} method
@@ -57,7 +57,7 @@ public interface FastStreamingDocsCallback {
/**
* A new child doc starts
*
- * @param parentDocObj an objec that will be shared across all the {{@link
+ * @param parentDocObj an object that will be shared across all the {{@link
* FastStreamingDocsCallback#field(DataEntry, Object)}}
* @return any custom object that be shared with the fields in this child doc
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/ResponseParser.java b/solr/solrj/src/java/org/apache/solr/client/solrj/ResponseParser.java
index 1ef789157d7..1fcb7c7603d 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/ResponseParser.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/ResponseParser.java
@@ -33,7 +33,7 @@ public abstract class ResponseParser {
public abstract NamedList<Object> processResponse(Reader reader);
/**
- * A well behaved ResponseParser will return its content-type.
+ * A well-behaved ResponseParser will return its content-type.
*
* @return the content-type this parser expects to parse
* @deprecated use {@link #getContentTypes()} instead
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java
index 31ff4f2c71a..7bdd6b27ca6 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java
@@ -544,7 +544,7 @@ public abstract class SolrClient implements Serializable, Closeable {
*
* <p>Note: In most cases it is not required to do explicit optimize
*
- * @param collection the Solr collection to send the optimize to
+ * @param collection the Solr collection to send the optimize command to
* @return an {@link org.apache.solr.client.solrj.response.UpdateResponse} containing the response
* from the server
* @throws IOException If there is a low-level I/O error.
@@ -575,7 +575,7 @@ public abstract class SolrClient implements Serializable, Closeable {
*
* <p>Note: In most cases it is not required to do explicit optimize
*
- * @param collection the Solr collection to send the optimize to
+ * @param collection the Solr collection to send the optimize command to
* @param waitFlush block until index changes are flushed to disk
* @param waitSearcher block until a new searcher is opened and registered as the main query
* searcher, making the changes visible
@@ -612,7 +612,7 @@ public abstract class SolrClient implements Serializable, Closeable {
*
* <p>Note: In most cases it is not required to do explicit optimize
*
- * @param collection the Solr collection to send the optimize to
+ * @param collection the Solr collection to send the optimize command to
* @param waitFlush block until index changes are flushed to disk
* @param waitSearcher block until a new searcher is opened and registered as the main query
* searcher, making the changes visible
@@ -973,7 +973,7 @@ public abstract class SolrClient implements Serializable, Closeable {
/**
* Query solr, and stream the results. Unlike the standard query, this will send events for each
- * Document rather then add them to the QueryResponse.
+ * Document rather than add them to the QueryResponse.
*
* <p>Although this function returns a 'QueryResponse' it should be used with care since it
* excludes anything that was passed to callback. Also note that future version may pass even more
@@ -1013,7 +1013,7 @@ public abstract class SolrClient implements Serializable, Closeable {
/**
* Query solr, and stream the results. Unlike the standard query, this will send events for each
- * Document rather then add them to the QueryResponse.
+ * Document rather than add them to the QueryResponse.
*
* <p>Although this function returns a 'QueryResponse' it should be used with care since it
* excludes anything that was passed to callback. Also note that future version may pass even more
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java
index 5719efcd180..d82f46a399a 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java
@@ -615,7 +615,7 @@ public class SolrQuery extends ModifiableSolrParams {
}
/**
- * Gets an a list of current sort clauses.
+ * Gets a list of current sort clauses.
*
* @return an immutable list of current sort clauses
* @since 4.2
@@ -683,7 +683,7 @@ public class SolrQuery extends ModifiableSolrParams {
/**
* Updates or adds a single sort field specification to the current sort information. If the sort
* field already exist in the sort information map, its position is unchanged and the sort order
- * is set; if it does not exist, it is appended at the end with the specified order..
+ * is set; if it does not exist, it is appended at the end with the specified order.
*
* @return the modified SolrQuery object, for easy chaining
* @since 4.2
@@ -1333,7 +1333,7 @@ public class SolrQuery extends ModifiableSolrParams {
}
/**
- * Creates a decending SortClause for an item
+ * Creates a descending SortClause for an item
*
* @param item item to sort on
*/
@@ -1342,7 +1342,7 @@ public class SolrQuery extends ModifiableSolrParams {
}
/**
- * Gets the item to sort, typically a function or a fieldname
+ * Gets the item to sort, typically a function or a field name
*
* @return item to sort
*/
@@ -1353,7 +1353,7 @@ public class SolrQuery extends ModifiableSolrParams {
/**
* Gets the order to sort
*
- * @return order to sort
+ * @return order to sort by
*/
public ORDER getOrder() {
return order;
@@ -1373,7 +1373,7 @@ public class SolrQuery extends ModifiableSolrParams {
}
/**
- * Gets a human readable description of the sort clause.
+ * Gets a human-readable description of the sort clause.
*
* <p>The returned string is not suitable for passing to Solr, but may be useful in debug output
* and the like.
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/ShardTerms.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/ShardTerms.java
index b693e7d624c..103e7cba74f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/ShardTerms.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/ShardTerms.java
@@ -125,7 +125,7 @@ public class ShardTerms implements MapWriter {
}
/**
- * Return a new {@link ShardTerms} in which highest terms are not zero
+ * Return a new {@link ShardTerms} in which the highest terms are not zero
*
* @return null if highest terms are already larger than zero
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/SocketProxy.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/SocketProxy.java
index 5dd5d1268f6..154ff7d1336 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/SocketProxy.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/SocketProxy.java
@@ -97,7 +97,7 @@ public class SocketProxy {
@Override
public String toString() {
- return "SocketyProxy: port=" + listenPort + "; target=" + target;
+ return "SocketProxy: port=" + listenPort + "; target=" + target;
}
public void setReceiveBufferSize(int receiveBufferSize) {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java
index d9186057ef7..75c50167d2b 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java
@@ -112,7 +112,7 @@ public abstract class BaseHttpClusterStateProvider implements ClusterStateProvid
log.warn("Attempt to fetch cluster state from {} failed.", baseUrl, e);
} catch (NotACollectionException e) {
// Cluster state for the given collection was not found, could be an alias.
- // Lets fetch/update our aliases:
+ // Let's fetch/update our aliases:
getAliases(true);
return null;
}
@@ -350,7 +350,7 @@ public abstract class BaseHttpClusterStateProvider implements ClusterStateProvid
} catch (SolrServerException | BaseHttpSolrClient.RemoteSolrException | IOException e) {
log.warn("Attempt to fetch cluster state from {} failed.", baseUrl, e);
} catch (NotACollectionException e) {
- // not possible! (we passed in null for collection so it can't be an alias)
+ // not possible! (we passed in null for collection, so it can't be an alias)
throw new RuntimeException(
"null should never cause NotACollectionException in "
+ "fetchClusterState() Please report this as a bug!");
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpSolrClient.java
index 2781adb6405..c1da336d7d5 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpSolrClient.java
@@ -43,8 +43,8 @@ public abstract class BaseHttpSolrClient extends SolrClient {
}
/**
- * This should be thrown when a server has an error in executing the request and it sends a proper
- * payload back to the client
+ * This should be thrown when a server has an error in executing the request, and it sends a
+ * proper payload back to the client
*/
public static class RemoteExecutionException extends RemoteSolrException {
private NamedList<?> meta;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
index ffd481fe494..f45945ae045 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
@@ -233,7 +233,7 @@ public class CloudHttp2SolrClient extends CloudSolrClient {
if (zkChroot.isPresent()) this.zkChroot = zkChroot.get();
}
- /** Whether or not to use the default ZK ACLs when building a ZK Client. */
+ /** Whether to use the default ZK ACLs when building a ZK Client. */
public Builder canUseZkACLs(boolean canUseZkACLs) {
this.canUseZkACLs = canUseZkACLs;
return this;
@@ -346,7 +346,7 @@ public class CloudHttp2SolrClient extends CloudSolrClient {
}
/**
- * This is the time to wait to refetch the state after getting the same state version from ZK
+ * This is the time to wait to re-fetch the state after getting the same state version from ZK
*
* @deprecated Please use {@link #withRetryExpiryTime(long, TimeUnit)}
*/
@@ -357,7 +357,7 @@ public class CloudHttp2SolrClient extends CloudSolrClient {
}
/**
- * This is the time to wait to refetch the state after getting the same state version from ZK
+ * This is the time to wait to re-fetch the state after getting the same state version from ZK
*/
public Builder withRetryExpiryTime(long expiryTime, TimeUnit unit) {
this.retryExpiryTimeNano = TimeUnit.NANOSECONDS.convert(expiryTime, unit);
@@ -413,7 +413,7 @@ public class CloudHttp2SolrClient extends CloudSolrClient {
/**
* If provided, the CloudHttp2SolrClient will build it's internal Http2SolrClient using this
* builder (instead of the empty default one). Providing this builder allows users to configure
- * the internal clients (authentication, timeouts, etc).
+ * the internal clients (authentication, timeouts, etc.).
*
* @param internalClientBuilder the builder to use for creating the internal http client.
* @return this
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudLegacySolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudLegacySolrClient.java
index e1f3840cfbd..224757200ff 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudLegacySolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudLegacySolrClient.java
@@ -232,7 +232,7 @@ public class CloudLegacySolrClient extends CloudSolrClient {
if (zkChroot.isPresent()) this.zkChroot = zkChroot.get();
}
- /** Whether or not to use the default ZK ACLs when building a ZK Client. */
+ /** Whether to use the default ZK ACLs when building a ZK Client. */
public Builder canUseZkACLs(boolean canUseZkACLs) {
this.canUseZkACLs = canUseZkACLs;
return this;
@@ -288,7 +288,7 @@ public class CloudLegacySolrClient extends CloudSolrClient {
/**
* This method has no effect.
*
- * <p>In older versions of Solr, this method was an incorrectly named equivilent to {@link
+ * <p>In older versions of Solr, this method was an incorrectly named equivalent to {@link
* #sendUpdatesToAnyReplica}, which had no effect because that setting was ignored in the
* created clients. When the underlying {@link CloudSolrClient} behavior was fixed, this method
* was modified to be an explicit No-Op, since the implied behavior of sending updates to
@@ -323,7 +323,7 @@ public class CloudLegacySolrClient extends CloudSolrClient {
* Tells {@link Builder} that created clients can send updates to any shard replica (shard
* leaders and non-leaders).
*
- * <p>Shard leaders are still preferred, but the created clients will fallback to using other
+ * <p>Shard leaders are still preferred, but the created clients will fall back to using other
* replicas if a leader cannot be found.
*
* @see #sendDirectUpdatesToShardLeadersOnly
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
index 3ac950d0417..e08e904703f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
@@ -298,7 +298,7 @@ public abstract class CloudSolrClient extends SolrClient {
/**
* Connect to the zookeeper ensemble. This is an optional method that may be used to force a
- * connect before any other requests are sent.
+ * connection before any other requests are sent.
*/
public void connect() {
getClusterStateProvider().connect();
@@ -398,7 +398,7 @@ public abstract class CloudSolrClient extends SolrClient {
if (routes == null) {
if (directUpdatesToLeadersOnly && hasInfoToFindLeaders(updateRequest, routeField)) {
// we have info (documents with ids and/or ids to delete) with
- // which to find the leaders but we could not find (all of) them
+ // which to find the leaders, but we could not find (all of) them
throw new SolrException(
SolrException.ErrorCode.SERVICE_UNAVAILABLE,
"directUpdatesToLeadersOnly==true but could not find leader(s)");
@@ -775,7 +775,7 @@ public abstract class CloudSolrClient extends SolrClient {
throws SolrServerException, IOException {
connect(); // important to call this before you start working with the ZkStateReader
- // build up a _stateVer_ param to pass to the server containing all of the
+ // build up a _stateVer_ param to pass to the server containing all the
// external collection state versions involved in this request, which allows
// the server to notify us that our cached state for one or more of the external
// collections is stale and needs to be refreshed ... this code has no impact on internal
@@ -893,7 +893,7 @@ public abstract class CloudSolrClient extends SolrClient {
}
}
if (retryCount < MAX_STALE_RETRIES) { // if it is a communication error , we must try again
- // may be, we have a stale version of the collection state
+ // may be, we have a stale version of the collection state,
// and we could not get any information from the server
// it is probably not worth trying again and again because
// the state would not have been updated
@@ -932,7 +932,7 @@ public abstract class CloudSolrClient extends SolrClient {
// re-issue request using updated state
stateWasStale = true;
- // just re-read state for all of them, which is a little heavy handed but hopefully a rare
+ // just re-read state for all of them, which is a little heavy-handed but hopefully a rare
// occurrence
for (DocCollection ext : requestedCollections) {
collectionStateCache.remove(ext.getName());
@@ -1116,7 +1116,7 @@ public abstract class CloudSolrClient extends SolrClient {
replica -> {
if (seenNodes.add(replica.getNodeName())) {
if (inputCollections.size() == 1 && collectionNames.size() == 1) {
- // If we have a single collection name (and not a alias to multiple collection),
+ // If we have a single collection name (and not an alias to multiple collection),
// send the query directly to a replica of this collection.
requestEndpoints.add(
new LBSolrClient.Endpoint(replica.getBaseUrl(), replica.getCoreName()));
@@ -1174,7 +1174,7 @@ public abstract class CloudSolrClient extends SolrClient {
/**
* If true, this client has been configured such that "direct updates" will <em>only</em> be sent
- * to the current leader of the corrisponding shard, and will not be retried with other replicas.
+ * to the current leader of the corresponding shard, and will not be retried with other replicas.
* This method has no effect if {@link #isUpdatesToLeaders()} or {@link
* IsUpdateRequest#isSendToLeaders} returns false.
*
@@ -1183,7 +1183,7 @@ public abstract class CloudSolrClient extends SolrClient {
* the default router; non-direct updates are things like commits and "delete by query").
*
* <p>NOTE: If a single {@link UpdateRequest} contains multiple "direct updates" for different
- * shards, this client may break the request up and merge th resposes.
+ * shards, this client may break the request up and merge the responses.
*
* @return true if direct updates are sent to shard leaders only
*/
@@ -1214,7 +1214,7 @@ public abstract class CloudSolrClient extends SolrClient {
Math.abs(Hash.murmurhash3_x86_32(collection, 0, collection.length(), 0) % locks.length);
final Object lock = locks[lockId];
synchronized (lock) {
- /*we have waited for sometime just check once again*/
+ /*we have waited for some time just check once again*/
cacheEntry = collectionStateCache.get(collection);
col = cacheEntry == null ? null : cacheEntry.cached;
if (col != null) {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
index d39fd607a15..f485a75ef5f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
@@ -407,9 +407,9 @@ public class ConcurrentUpdateHttp2SolrClient extends SolrClient {
int lastQueueSize = -1;
for (; ; ) {
synchronized (runners) {
- // see if queue is half full and we can add more runners
+ // see if queue is half full, and we can add more runners
// special case: if only using a threadCount of 1 and the queue
- // is filling up, allow 1 add'l runner to help process the queue
+ // is filling up, allow 1 additional runner to help process the queue
if (runners.isEmpty()
|| (queue.remainingCapacity() < queue.size() && runners.size() < threadCount)) {
// We need more runners, so start a new one.
@@ -486,7 +486,7 @@ public class ConcurrentUpdateHttp2SolrClient extends SolrClient {
synchronized (runners) {
- // NOTE: if the executor is shut down, runners may never become empty (a scheduled task may
+ // NOTE: if the executor is shut down, runners may never become empty. A scheduled task may
// never be run, which means it would never remove itself from the runners list. This is why
// we don't wait forever and periodically check if the scheduler is shutting down.
int loopCount = 0;
@@ -627,7 +627,7 @@ public class ConcurrentUpdateHttp2SolrClient extends SolrClient {
}
/**
- * Intended to be used as an extension point for doing post processing after a request completes.
+ * Intended to be used as an extension point for doing post-processing after a request completes.
*
* @param respBody the body of the response, subclasses must not close this stream.
*/
@@ -819,7 +819,7 @@ public class ConcurrentUpdateHttp2SolrClient extends SolrClient {
/**
* Configures created clients to not stream delete requests.
*
- * <p>With this option set when the created ConcurrentUpdateHttp2SolrClient sents a delete
+ * <p>With this option set when the created ConcurrentUpdateHttp2SolrClient sends a delete
* request it will first will lock the queue and block until all queued updates have been sent,
* and then send the delete request.
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
index 6800f435b07..3896f1e8e87 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
@@ -533,9 +533,9 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
int lastQueueSize = -1;
for (; ; ) {
synchronized (runners) {
- // see if queue is half full and we can add more runners
+ // see if queue is half full, and we can add more runners
// special case: if only using a threadCount of 1 and the queue
- // is filling up, allow 1 add'l runner to help process the queue
+ // is filling up, allow 1 additional runner to help process the queue
if (runners.isEmpty()
|| (queue.remainingCapacity() < queue.size() && runners.size() < threadCount)) {
// We need more runners, so start a new one.
@@ -612,7 +612,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
synchronized (runners) {
- // NOTE: if the executor is shut down, runners may never become empty (a scheduled task may
+ // NOTE: if the executor is shut down, runners may never become empty. A scheduled task may
// never be run, which means it would never remove itself from the runners list. This is why
// we don't wait forever and periodically check if the scheduler is shutting down.
int loopCount = 0;
@@ -756,7 +756,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
}
/**
- * Intended to be used as an extension point for doing post processing after a request completes.
+ * Intended to be used as an extension point for doing post-processing after a request completes.
*/
public void onSuccess(HttpResponse resp) {
// no-op by design, override to add functionality
@@ -791,7 +791,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
if (internalHttpClient) IOUtils.closeQuietly(client);
if (log.isDebugEnabled()) {
log.debug(
- "STATS pollInteruppts={} pollExists={} blockLoops={} emptyQueueLoops={}",
+ "STATS pollInterrupts={} pollExists={} blockLoops={} emptyQueueLoops={}",
pollInterrupts.get(),
pollExits.get(),
blockLoops.get(),
@@ -928,7 +928,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
/**
* Configures created clients to not stream delete requests.
*
- * <p>With this option set when the created ConcurrentUpdateSolrClient sents a delete request it
+ * <p>With this option set when the created ConcurrentUpdateSolrClient sends a delete request it
* will first will lock the queue and block until all queued updates have been sent, and then
* send the delete request.
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
index 0164c42e63c..f3de7a75727 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
@@ -367,7 +367,7 @@ public class Http2SolrClient extends HttpSolrClientBase {
String contentType = requestWriter.getUpdateContentType();
final ModifiableSolrParams origParams = new ModifiableSolrParams(updateRequest.getParams());
ModifiableSolrParams requestParams =
- initalizeSolrParams(updateRequest, responseParser(updateRequest));
+ initializeSolrParams(updateRequest, responseParser(updateRequest));
String basePath = baseUrl;
if (collection != null) basePath += "/" + collection;
@@ -624,7 +624,7 @@ public class Http2SolrClient extends HttpSolrClientBase {
private MakeRequestReturnValue makeRequest(
SolrRequest<?> solrRequest, String url, boolean isAsync)
throws IOException, SolrServerException {
- ModifiableSolrParams wparams = initalizeSolrParams(solrRequest, responseParser(solrRequest));
+ ModifiableSolrParams wparams = initializeSolrParams(solrRequest, responseParser(solrRequest));
if (SolrRequest.METHOD.GET == solrRequest.getMethod()) {
validateGetRequest(solrRequest);
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientBuilderFactory.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientBuilderFactory.java
index 55d58f307c2..ed8cb32ec60 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientBuilderFactory.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientBuilderFactory.java
@@ -30,7 +30,7 @@ public interface HttpClientBuilderFactory extends Closeable {
* This method configures the {@linkplain SolrHttpClientBuilder} by overriding the configuration
* of passed SolrHttpClientBuilder or as a new instance.
*
- * @param builder The instance of the {@linkplain SolrHttpClientBuilder} which should by
+ * @param builder The instance of the {@linkplain SolrHttpClientBuilder} which should be
* configured (optional).
* @return the {@linkplain SolrHttpClientBuilder}
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
index b0d86fa2c6d..6aafaceef46 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
@@ -70,7 +70,7 @@ import org.slf4j.LoggerFactory;
* <p>This class can touch internal HttpClient details and is subject to change.
*
* @lucene.experimental
- * @deprecated Used to configure the Apache HTTP client. Please use The Http2 client
+ * @deprecated Used to configure the Apache HTTP client. Please use the Http2 client
*/
@Deprecated(since = "9.0")
public class HttpClientUtil {
@@ -111,7 +111,7 @@ public class HttpClientUtil {
public static final String SYS_PROP_CHECK_PEER_NAME = "solr.ssl.checkPeerName";
// * NOTE* The following params configure the default request config and this
- // is overridden by SolrJ clients. Use the setters on the SolrJ clients to
+ // is overridden by SolrJ clients. Use the setters on the SolrJ clients
// to configure these settings if that is the intent.
// Follow redirects
@@ -552,7 +552,7 @@ public class HttpClientUtil {
/**
* Create a HttpClientContext object and {@link HttpClientContext#setUserToken(Object)} to an
- * internal singleton. It allows to reuse underneath {@link HttpClient} in connection pools if
+ * internal singleton. It allows reusing underlying {@link HttpClient} in connection pools if
* client authentication is enabled.
*/
public static HttpClientContext createNewHttpClientRequestContext() {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpJdkSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpJdkSolrClient.java
index 32f988ddaa3..d3610f8d544 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpJdkSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpJdkSolrClient.java
@@ -200,7 +200,7 @@ public class HttpJdkSolrClient extends HttpSolrClientBase {
}
String url = getRequestUrl(solrRequest, collection);
ResponseParser parserToUse = responseParser(solrRequest);
- ModifiableSolrParams queryParams = initalizeSolrParams(solrRequest, parserToUse);
+ ModifiableSolrParams queryParams = initializeSolrParams(solrRequest, parserToUse);
var reqb = HttpRequest.newBuilder();
PreparedRequest pReq = null;
try {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
index 41eb07207a9..60804ebcb4b 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
@@ -736,7 +736,7 @@ public class HttpSolrClient extends BaseHttpSolrClient {
// When raising an error using HTTP sendError, mime types can be mismatched. This is specifically
// true when SolrDispatchFilter uses the sendError mechanism since the expected MIME type of
- // response is not HTML but HTTP sendError generates a HTML output, which can lead to mismatch
+ // response is not HTML but HTTP sendError generates an HTML output, which can lead to mismatch
private boolean isUnmatchedErrorCode(String mimeType, int httpStatus) {
if (mimeType == null) {
return false;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClientBase.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClientBase.java
index 6645e4f7cae..a395c681dd9 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClientBase.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClientBase.java
@@ -121,8 +121,15 @@ public abstract class HttpSolrClientBase extends SolrClient {
return solrRequest.getResponseParser() == null ? this.parser : solrRequest.getResponseParser();
}
+ // TODO: Remove this for 10.0, there is a typo in the method name
+ @Deprecated(since = "9.8", forRemoval = true)
protected ModifiableSolrParams initalizeSolrParams(
SolrRequest<?> solrRequest, ResponseParser parserToUse) {
+ return initializeSolrParams(solrRequest, parserToUse);
+ }
+
+ protected ModifiableSolrParams initializeSolrParams(
+ SolrRequest<?> solrRequest, ResponseParser parserToUse) {
// The parser 'wt=' and 'version=' params are used instead of the original
// params
ModifiableSolrParams wparams = new ModifiableSolrParams(solrRequest.getParams());
@@ -283,7 +290,7 @@ public abstract class HttpSolrClientBase extends SolrClient {
try {
is.close();
} catch (IOException e) {
- // quitely
+ // quietly
}
}
}
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java
index 8b0971a53ac..221cbd4bb7e 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java
@@ -38,8 +38,8 @@ import org.apache.solr.common.params.ModifiableSolrParams;
* but this class may be used for updates because the server will forward them to the appropriate
* leader.
*
- * <p>It offers automatic failover when a server goes down and it detects when the server comes back
- * up.
+ * <p>It offers automatic failover when a server goes down, and it detects when the server comes
+ * back up.
*
* <p>Load balancing is done using a simple round-robin on the list of endpoints. Endpoint URLs are
* expected to point to the Solr "root" path (i.e. "/solr").
@@ -85,7 +85,7 @@ import org.apache.solr.common.params.ModifiableSolrParams;
* LBHttpSolrClient.Builder#setAliveCheckInterval(int)}. The default is set to one minute.
*
* <p><b>When to use this?</b><br>
- * This can be used as a software load balancer when you do not wish to setup an external load
+ * This can be used as a software load balancer when you do not wish to set up an external load
* balancer. Alternatives to this code are to use a dedicated hardware load balancer or using Apache
* httpd with mod_proxy_balancer as a load balancer. See <a
* href="http://en.wikipedia.org/wiki/Load_balancing_(computing)">Load balancing on Wikipedia</a>
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
index 1effc3b8a0a..a59efe7bc46 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java
@@ -432,7 +432,7 @@ public abstract class LBSolrClient extends SolrClient {
*
* <p>If no live servers are found a SolrServerException is thrown.
*
- * @param req contains both the request as well as the list of servers to query
+ * @param req contains both the request and the list of servers to query
* @return the result of the request
* @throws IOException If there is a low-level I/O error.
*/
@@ -590,7 +590,8 @@ public abstract class LBSolrClient extends SolrClient {
QueryResponse resp = queryRequest.process(getClient(zombieEndpoint), effectiveCollection);
if (resp.getStatus() == 0) {
// server has come back up.
- // make sure to remove from zombies before adding to alive to avoid a race condition
+ // make sure to remove from zombies before adding to the alive list to avoid a race
+ // condition
// where another thread could mark it down, move it back to zombie, and then we delete
// from zombie and lose it forever.
EndpointWrapper wrapper = zombieServers.remove(zombieServer.getEndpoint().toString());
@@ -722,7 +723,8 @@ public abstract class LBSolrClient extends SolrClient {
final String effectiveCollection =
endpoint.getCore() == null ? collection : endpoint.getCore();
NamedList<Object> rsp = getClient(endpoint).request(request, effectiveCollection);
- // remove from zombie list *before* adding to alive to avoid a race that could lose a server
+ // remove from zombie list *before* adding to the alive list to avoid a race that could lose
+ // a server
zombieServers.remove(endpoint.getUrl());
addToAlive(wrapper);
return rsp;
@@ -764,7 +766,7 @@ public abstract class LBSolrClient extends SolrClient {
}
/**
- * Pick a server from list to execute request. By default servers are picked in round-robin
+ * Pick a server from list to execute request. By default, servers are picked in round-robin
* manner, custom classes can override this method for more advance logic
*
* @param aliveServerList list of currently alive servers
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/PreemptiveBasicAuthClientBuilderFactory.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/PreemptiveBasicAuthClientBuilderFactory.java
index cc26e3f1edd..0d1231baa74 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/PreemptiveBasicAuthClientBuilderFactory.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/PreemptiveBasicAuthClientBuilderFactory.java
@@ -46,7 +46,7 @@ import org.eclipse.jetty.client.WWWAuthenticationProtocolHandler;
public class PreemptiveBasicAuthClientBuilderFactory implements HttpClientBuilderFactory {
/**
* A system property used to specify a properties file containing default parameters used for
- * creating a HTTP client. This is specifically useful for configuring the HTTP basic auth
+ * creating an HTTP client. This is specifically useful for configuring the HTTP basic auth
* credentials (i.e. username/password). The name of the property must match the relevant Solr
* config property name.
*/
@@ -64,7 +64,7 @@ public class PreemptiveBasicAuthClientBuilderFactory implements HttpClientBuilde
private static CredentialsResolver CREDENTIAL_RESOLVER = new CredentialsResolver();
/**
- * This method enables configuring system wide defaults (apart from using a config file based
+ * This method enables configuring system-wide defaults (apart from using a config file based
* approach).
*/
public static void setDefaultSolrParams(SolrParams params) {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrHttpRequestRetryHandler.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrHttpRequestRetryHandler.java
index 4ec079a10d5..2ec94c5cbf4 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrHttpRequestRetryHandler.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrHttpRequestRetryHandler.java
@@ -51,7 +51,7 @@ public class SolrHttpRequestRetryHandler implements HttpRequestRetryHandler {
/** the number of times a method will be retried */
private final int retryCount;
- private final Set<Class<? extends IOException>> nonRetriableClasses;
+ private final Set<Class<? extends IOException>> nonRetryableClasses;
/**
* Create the request retry handler using the specified IOException classes
@@ -64,14 +64,14 @@ public class SolrHttpRequestRetryHandler implements HttpRequestRetryHandler {
final int retryCount, final Collection<Class<? extends IOException>> clazzes) {
super();
this.retryCount = retryCount;
- this.nonRetriableClasses = new HashSet<>();
+ this.nonRetryableClasses = new HashSet<>();
for (final Class<? extends IOException> clazz : clazzes) {
- this.nonRetriableClasses.add(clazz);
+ this.nonRetryableClasses.add(clazz);
}
}
/**
- * Create the request retry handler using the following list of non-retriable IOException classes:
+ * Create the request retry handler using the following list of non-retryable IOException classes:
* <br>
*
* <ul>
@@ -96,7 +96,7 @@ public class SolrHttpRequestRetryHandler implements HttpRequestRetryHandler {
/**
* Create the request retry handler with a retry count of 3, requestSentRetryEnabled false and
- * using the following list of non-retriable IOException classes: <br>
+ * using the following list of non-retryable IOException classes: <br>
*
* <ul>
* <li>InterruptedIOException
@@ -118,9 +118,9 @@ public class SolrHttpRequestRetryHandler implements HttpRequestRetryHandler {
return false;
}
- if (!isRetriable(exception)) {
+ if (!isRetryable(exception)) {
if (log.isDebugEnabled()) {
- log.debug("Do not retry, non retriable class {}", exception.getClass().getName());
+ log.debug("Do not retry, non retryable class {}", exception.getClass().getName());
}
return false;
}
@@ -142,7 +142,7 @@ public class SolrHttpRequestRetryHandler implements HttpRequestRetryHandler {
return false;
}
- private boolean isRetriable(IOException exception) {
+ private boolean isRetryable(IOException exception) {
// Workaround for "recv failed" issue on hard-aborted sockets on Windows
// (and other operating systems, possibly).
// https://issues.apache.org/jira/browse/SOLR-13778
@@ -152,8 +152,8 @@ public class SolrHttpRequestRetryHandler implements HttpRequestRetryHandler {
}
// Fast check for exact class followed by slow-check with instanceof.
- if (nonRetriableClasses.contains(exception.getClass())
- || nonRetriableClasses.stream()
+ if (nonRetryableClasses.contains(exception.getClass())
+ || nonRetryableClasses.stream()
.anyMatch(rejectException -> rejectException.isInstance(exception))) {
return false;
}
@@ -167,7 +167,7 @@ public class SolrHttpRequestRetryHandler implements HttpRequestRetryHandler {
protected boolean handleAsIdempotent(final HttpClientContext context) {
String method = context.getRequest().getRequestLine().getMethod();
- // do not retry admin requests, even if they are GET as they are not idempotent
+ // do not retry admin requests, even if they are GET requests as they are not idempotent
if (context.getRequest().getRequestLine().getUri().startsWith("/admin/")) {
log.debug("Do not retry, this is an admin request");
return false;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/StreamingBinaryResponseParser.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/StreamingBinaryResponseParser.java
index ecf37240db2..62a0df519a1 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/StreamingBinaryResponseParser.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/StreamingBinaryResponseParser.java
@@ -34,7 +34,7 @@ import org.apache.solr.common.util.JavaBinCodec;
import org.apache.solr.common.util.NamedList;
/**
- * A BinaryResponseParser that sends callback events rather then build a large response
+ * A BinaryResponseParser that sends callback events rather than build a large response
*
* @since solr 4.0
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java
index b33f6771c16..83be4eee8fb 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java
@@ -67,7 +67,7 @@ public class XMLResponseParser extends ResponseParser {
factory.setProperty("reuse-instance", Boolean.FALSE);
} catch (IllegalArgumentException ex) {
// Other implementations will likely throw this exception since "reuse-instance"
- // isimplementation specific.
+ // is implementation specific.
log.debug("Unable to set the 'reuse-instance' property for the input factory: {}", factory);
}
factory.setXMLReporter(xmllog);
@@ -492,7 +492,7 @@ public class XMLResponseParser extends ResponseParser {
continue; // may be more child docs, or other fields
}
- // other then nested documents, all other possible nested elements require a name...
+ // other than nested documents, all other possible nested elements require a name...
name = null;
int cnt = parser.getAttributeCount();
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/ConfigSetAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/ConfigSetAdminRequest.java
index c3de347777d..4c21ce6c776 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/ConfigSetAdminRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/ConfigSetAdminRequest.java
@@ -113,7 +113,7 @@ public abstract class ConfigSetAdminRequest<
* Uploads files to create a new configset, or modify an existing config set.
*
* <p>When creating a new configset, the file to be uploaded must be a ZIP file containing the
- * entire configset being uploaded. When modifing an existing configset, the file to be uploaded
+ * entire configset being uploaded. When modifying an existing configset, the file to be uploaded
* should either be a ZIP file containing the entire configset being uploaded, or an individual
* file to upload if {@link #setFilePath} is being used.
*/
@@ -153,7 +153,7 @@ public abstract class ConfigSetAdminRequest<
}
/**
- * A convinience method for specifying an existing File to use as the upload data.
+ * A convenience method for specifying an existing File to use as the upload data.
*
* <p>This should either be a ZIP file containing the entire configset being uploaded, or an
* individual file to upload into an existing configset if {@link #setFilePath} is being used.
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/DocumentAnalysisRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/DocumentAnalysisRequest.java
index 912ba039756..069a263fef1 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/DocumentAnalysisRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/DocumentAnalysisRequest.java
@@ -97,9 +97,9 @@ public class DocumentAnalysisRequest
// ===== Helper Methods =====
/**
- * Returns the xml be be set as the request body.
+ * Returns the xml being set as the request body.
*
- * @return The xml be be set as the request body.
+ * @return The xml being set as the request body.
* @throws IOException When constructing the xml fails
*/
String getXML(Writer writer) throws IOException {
@@ -141,7 +141,7 @@ public class DocumentAnalysisRequest
}
/**
- * Sets the query to be analyzed. By default the query is set to null, meaning no query analysis
+ * Sets the query to be analyzed. By default, the query is set to null, meaning no query analysis
* will be performed.
*
* @param query The query to be analyzed.
@@ -154,7 +154,7 @@ public class DocumentAnalysisRequest
/**
* Sets whether index time tokens that match query time tokens should be marked as a "match". By
- * default this is set to {@code false}. Obviously, this flag is ignored if when the query is set
+ * default, this is set to {@code false}. Obviously, this flag is ignored if when the query is set
* to {@code null}.
*
* @param showMatch Sets whether index time tokens that match query time tokens should be marked
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/FieldAnalysisRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/FieldAnalysisRequest.java
index 8dda80d22f4..b513b917428 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/FieldAnalysisRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/FieldAnalysisRequest.java
@@ -89,7 +89,7 @@ public class FieldAnalysisRequest extends CollectionRequiringSolrRequest<FieldAn
// ===== Helper Methods =====
/**
- * Convers the given list of string to a comma-separated string.
+ * Converts the given list of strings to a comma-separated string.
*
* @param list The list of string.
* @return The comma-separated string.
@@ -152,7 +152,7 @@ public class FieldAnalysisRequest extends CollectionRequiringSolrRequest<FieldAn
/**
* Sets whether index time tokens that match query time tokens should be marked as a "match". By
- * default this is set to {@code false}. Obviously, this flag is ignored if when the query is set
+ * default, this is set to {@code false}. Obviously, this flag is ignored if when the query is set
* to {@code null}.
*
* @param showMatch Sets whether index time tokens that match query time tokens should be marked
@@ -236,7 +236,7 @@ public class FieldAnalysisRequest extends CollectionRequiringSolrRequest<FieldAn
/**
* Returns a list of field types the analysis should be performed on. May return {@code null}
- * indicating that no analysis will be peformed on field types.
+ * indicating that no analysis will be performed on field types.
*
* @return The field types the analysis should be performed on.
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/HealthCheckRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/HealthCheckRequest.java
index 53907201c2b..7937beadd02 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/HealthCheckRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/HealthCheckRequest.java
@@ -57,7 +57,7 @@ public class HealthCheckRequest extends SolrRequest<HealthCheckResponse> {
@Override
protected HealthCheckResponse createResponse(SolrClient client) {
// TODO: Accept requests w/ CloudSolrClient while ensuring that the request doesn't get routed
- // to an unintended recepient.
+ // to an unintended recipient.
assert client instanceof HttpSolrClient;
return new HealthCheckResponse();
}
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/json/TermsFacetMap.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/json/TermsFacetMap.java
index ef1b66e5971..e13aa32f36b 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/json/TermsFacetMap.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/json/TermsFacetMap.java
@@ -179,7 +179,7 @@ public class TermsFacetMap extends JsonFacetMap<TermsFacetMap> {
/**
* Indicates that Solr should include the total number of buckets for this facet.
*
- * <p>Note that this is different than the number of buckets returned. Defaults to false if not
+ * <p>Note that this is different from the number of buckets returned. Defaults to false if not
* specified
*
* @param numBuckets true if the "numBuckets" field should be computed; false otherwise
@@ -192,7 +192,7 @@ public class TermsFacetMap extends JsonFacetMap<TermsFacetMap> {
/**
* Creates a bucket representing the union of all other buckets.
*
- * <p>For multi-valued fields this is different than a bucket for the entire domain, since
+ * <p>For multi-valued fields this is different from a bucket for the entire domain, since
* documents can belong to multiple buckets. Defaults to false if not specified.
*
* @param shouldInclude true if the union bucket "allBuckets" should be computed; false otherwise
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/AnalysisResponseBase.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/AnalysisResponseBase.java
index 3c5cb6b006d..f458bdc01c9 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/AnalysisResponseBase.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/AnalysisResponseBase.java
@@ -96,8 +96,7 @@ public class AnalysisResponseBase extends SolrResponseBase {
}
/**
- * Parses the given named list and builds a token infoform it. Expects a named list of the form:
- * <br>
+ * Parses the given named list and builds a token from it. Expects a named list of the form: <br>
*
* <pre><code>
* &lt;arr name="Tokenizer"&gt;
@@ -142,7 +141,7 @@ public class AnalysisResponseBase extends SolrResponseBase {
}
/**
- * The name of the class (analyzer, tokenzier, or filter) that produced the token stream for
+ * The name of the class (analyzer, tokenizer, or filter) that produced the token stream for
* this phase.
*
* @return The name of the class that produced the token stream for this phase.
@@ -213,7 +212,7 @@ public class AnalysisResponseBase extends SolrResponseBase {
/**
* Returns the raw text of the token. If the token is index in a special format (e.g. date or
- * paddded numbers) it will be returned as the raw text. Returns {@code null} if the token is
+ * padded numbers) it will be returned as the raw text. Returns {@code null} if the token is
* indexed as is.
*
* @return Returns the raw text of the token.
@@ -223,8 +222,8 @@ public class AnalysisResponseBase extends SolrResponseBase {
}
/**
- * Returns the type of the token. Typically this will be {@code word} or {@code <ALPHANUM>}, but
- * it really depends on the tokenizer and filters that are used.
+ * Returns the type of the token. Typically, this will be {@code word} or {@code <ALPHANUM>},
+ * but it really depends on the tokenizer and filters that are used.
*
* @return The type of the token.
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/Cluster.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/Cluster.java
index e91f216f918..fad992c1388 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/Cluster.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/Cluster.java
@@ -36,7 +36,7 @@ public class Cluster {
}
/**
- * @param labels the list of human readable labels associated to the cluster
+ * @param labels the list of human-readable labels associated to the cluster
* @param score the score produced by the clustering algorithm for the current cluster
* @param docIds the list of document Ids belonging to the cluster
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/CollectionAdminResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/CollectionAdminResponse.java
index 563303fb9de..71aeb2c8d6e 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/CollectionAdminResponse.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/CollectionAdminResponse.java
@@ -37,7 +37,7 @@ public class CollectionAdminResponse extends SolrResponseBase {
return (String) getResponse().get("warning");
}
- // this messages are typically from individual nodes, since
+ // these messages are typically from individual nodes, since
// all the failures at the router are propagated as exceptions
@SuppressWarnings("unchecked")
public NamedList<String> getErrorMessages() {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/FacetField.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/FacetField.java
index ec00da4ee20..9e9025d7672 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/FacetField.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/FacetField.java
@@ -24,7 +24,7 @@ import org.apache.solr.client.solrj.util.ClientUtils;
/**
* A utility class to hold the facet response. It could use the NamedList container, but for JSTL,
- * it is nice to have something that implements List so it can be iterated
+ * it is nice to have something that implements List, so it can be iterated
*
* @since solr 1.3
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/FieldAnalysisResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/FieldAnalysisResponse.java
index 3c9125ef1e4..409ffe2a958 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/FieldAnalysisResponse.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/FieldAnalysisResponse.java
@@ -114,9 +114,9 @@ public class FieldAnalysisResponse extends AnalysisResponseBase {
}
/**
- * Returns all field name analysese with their associated field names.
+ * Returns all field name analyzed with their associated field names.
*
- * @return all field name analysese with their associated field names.
+ * @return all field name analyzed with their associated field names.
*/
public Iterable<Map.Entry<String, Analysis>> getAllFieldNameAnalysis() {
return analysisByFieldName.entrySet();
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/FieldStatsInfo.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/FieldStatsInfo.java
index c0d8702dcab..cd1ade0b3e3 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/FieldStatsInfo.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/FieldStatsInfo.java
@@ -168,7 +168,7 @@ public class FieldStatsInfo implements Serializable {
}
public Long getCountDistinct() {
- // :TODO: as client convinience, should we return cardinality if this is null?
+ // :TODO: as client convenience, should we return cardinality if this is null?
return countDistinct;
}
@@ -204,9 +204,9 @@ public class FieldStatsInfo implements Serializable {
return percentiles;
}
- /** The cardinality of of the set of values if requested, otherwise null. */
+ /** The cardinality of the set of values if requested, otherwise null. */
public Long getCardinality() {
- // :TODO: as client convinience, should we return countDistinct if this is null?
+ // :TODO: as client convenience, should we return countDistinct if this is null?
return cardinality;
}
}
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/Group.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/Group.java
index 6751d04bba3..5b6691186c5 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/Group.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/Group.java
@@ -24,7 +24,8 @@ import org.apache.solr.common.SolrDocumentList;
* share and documents that belong to this group.
*
* <p>A group value can be a field value, function result or a query string depending on the {@link
- * GroupCommand}. In case of a field value or a function result the value is always a indexed value.
+ * GroupCommand}. In case of a field value or a function result the value is always an indexed
+ * value.
*
* @since solr 3.4
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/LukeResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/LukeResponse.java
index bd81ed288b4..c38a2caf830 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/LukeResponse.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/LukeResponse.java
@@ -205,7 +205,7 @@ public class LukeResponse extends SolrResponseBase {
public void setResponse(NamedList<Object> res) {
super.setResponse(res);
- // Parse indexinfo
+ // Parse index information
indexInfo = (NamedList<Object>) res.get("index");
NamedList<Object> schema = (NamedList<Object>) res.get("schema");
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/QueryResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/QueryResponse.java
index 40070429c63..2a785632d24 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/QueryResponse.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/QueryResponse.java
@@ -637,7 +637,7 @@ public class QueryResponse extends SolrResponseBase {
}
/**
- * @return a list of FacetFields where the count is less then then #getResults() {@link
+ * @return a list of FacetFields where the count is less than the #getResults() {@link
* SolrDocumentList#getNumFound()}
* <p>If you want all results exactly as returned by solr, use: {@link #getFacetFields()}
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/RequestStatusState.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/RequestStatusState.java
index a0eb7b3a2e1..a6166fb97c2 100755
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/RequestStatusState.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/RequestStatusState.java
@@ -37,7 +37,7 @@ public enum RequestStatusState {
/** The request was submitted, but has not yet started. */
SUBMITTED("submitted"),
- /** The request Id was not found. */
+ /** The request was not found. */
NOT_FOUND("notfound");
private final String key;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/SpellCheckResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/SpellCheckResponse.java
index 709c3ce8556..2269365ceaf 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/SpellCheckResponse.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/SpellCheckResponse.java
@@ -56,7 +56,7 @@ public class SpellCheckResponse {
@SuppressWarnings("unchecked")
NamedList<Object> coll = (NamedList<Object>) spellInfo.get("collations");
if (coll != null) {
- // The 'collationInternalRank' values are ignored so we only care 'collation's.
+ // The 'collationInternalRank' values are ignored, so we only care about collation's.
List<Object> collationInfo = coll.getAll("collation");
collations = new ArrayList<>(collationInfo.size());
for (Object o : collationInfo) {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/TermsResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/TermsResponse.java
index 59aa42c97aa..9d2c1e544d9 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/TermsResponse.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/TermsResponse.java
@@ -51,7 +51,7 @@ public class TermsResponse {
}
/**
- * Get's the term list for a given field
+ * Gets the term list for a given field
*
* @return the term list or null if no terms for the given field exist
*/
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/json/BucketBasedJsonFacet.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/json/BucketBasedJsonFacet.java
index a5271524af9..525a4de04a3 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/json/BucketBasedJsonFacet.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/json/BucketBasedJsonFacet.java
@@ -89,7 +89,7 @@ public class BucketBasedJsonFacet {
*
* <p>This value can only be computed on "terms" facets where the user has specifically requested
* it with the {@code numBuckets} option. {@link #UNSET_FLAG} is returned if this is a "range"
- * facet or {@code numBuckets} computation was not requested in the intiial request.
+ * facet or {@code numBuckets} computation was not requested in the initial request.
*/
public long getNumBuckets() {
return numBuckets;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/routing/AffinityReplicaListTransformerFactory.java b/solr/solrj/src/java/org/apache/solr/client/solrj/routing/AffinityReplicaListTransformerFactory.java
index 1229ce56933..09609619c23 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/routing/AffinityReplicaListTransformerFactory.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/routing/AffinityReplicaListTransformerFactory.java
@@ -59,7 +59,7 @@ public class AffinityReplicaListTransformerFactory implements ReplicaListTransfo
* CommonParams#Q}. Empty String is translated to null, allowing users to explicitly disable
* hash-based stable routing.
*
- * @param hashParam configured hash param (null indicates unconfigured).
+ * @param hashParam configured hash param (null indicates no configuration).
* @return translated value to be used as default hash param in RLT.
*/
private static String translateHashParam(String hashParam) {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparator.java
index 0585fd3f7d3..527a8a30d5d 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparator.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparator.java
@@ -31,7 +31,7 @@ import org.apache.solr.common.util.StrUtils;
/**
* This comparator makes sure that the given replicas are sorted according to the given list of
* preferences. E.g. If all nodes prefer local cores then a bad/heavily-loaded node will receive
- * less requests from healthy nodes. This will help prevent a distributed deadlock or timeouts in
+ * fewer requests from healthy nodes. This will help prevent a distributed deadlock or timeouts in
* all the healthy nodes due to one bad node.
*
* <p>Optional final preferenceRule is *not* used for pairwise sorting, but instead defines how
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/routing/RequestReplicaListTransformerGenerator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/routing/RequestReplicaListTransformerGenerator.java
index 748d13f4b5d..28e2072e77f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/routing/RequestReplicaListTransformerGenerator.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/routing/RequestReplicaListTransformerGenerator.java
@@ -181,7 +181,7 @@ public class RequestReplicaListTransformerGenerator {
} while (iter.hasNext());
boundaries[boundaryCount++] = idx;
- // Finally inspect boundaries to apply base transformation, where necessary (separate phase
+ // Finally, inspect boundaries to apply base transformation, where necessary (separate phase
// to avoid ConcurrentModificationException)
int startIdx = 0;
int endIdx;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java b/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java
index 568bd7e5a77..78f369fb995 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java
@@ -69,7 +69,7 @@ public class ClientUtils {
* @param solrRequest the {@link SolrRequest} to build the URL for
* @param requestWriter a {@link RequestWriter} from the {@link SolrClient} that will be sending
* the request
- * @param serverRootUrl the root URL of the Solr server being targeted. May by overridden {@link
+ * @param serverRootUrl the root URL of the Solr server being targeted. May be overridden {@link
* SolrRequest#getBasePath()}, if present.
* @param collection the collection to send the request to. May be null if no collection is
* needed.
@@ -124,7 +124,7 @@ public class ClientUtils {
if (v instanceof SolrInputDocument) {
writeVal(writer, name, v, null);
} else if (v instanceof Map) {
- // currently only supports a single value
+ // currently, only supports a single value
for (Entry<Object, Object> entry : ((Map<Object, Object>) v).entrySet()) {
update = entry.getKey().toString();
v = entry.getValue();
@@ -211,7 +211,7 @@ public class ClientUtils {
* See: <a href="https://www.google.com/?gws_rd=ssl#q=lucene+query+parser+syntax">Lucene query
* parser syntax</a> for more information on Escaping Special Characters
*/
- // NOTE: its broken to link to any lucene-queryparser.jar docs, not in classpath!!!!!
+ // NOTE: It is a broken link to any lucene-queryparser.jar docs, not in classpath!!!!!
public static String escapeQueryChars(String s) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
@@ -246,11 +246,11 @@ public class ClientUtils {
}
/**
- * Returns the (literal) value encoded properly so it can be appended after a <code>name=</code>
+ * Returns the (literal) value encoded properly, so it can be appended after a <code>name=</code>
* local-param key.
*
* <p>NOTE: This method assumes <code>$</code> is a literal character that must be quoted. (It
- * does not assume strings starting <code>$</code> should be treated as param refrenes)
+ * does not assume strings starting <code>$</code> should be treated as param references)
*/
public static String encodeLocalParamVal(String val) {
int len = val.length();
@@ -297,7 +297,7 @@ public class ClientUtils {
}
/**
- * Determines whether any SolrClient "default" collection should applied to the specified request
+ * Determines whether any SolrClient "default" collection should apply to the specified request
*
* @param providedCollection a collection/core explicitly provided to the SolrClient (typically
* through {@link org.apache.solr.client.solrj.SolrClient#request(SolrRequest, String)}
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/util/SolrIdentifierValidator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/util/SolrIdentifierValidator.java
index 0a9115068ef..b8476ace462 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/util/SolrIdentifierValidator.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/util/SolrIdentifierValidator.java
@@ -22,7 +22,7 @@ import org.apache.solr.common.SolrException;
/**
* Ensures that provided identifiers align with Solr's recommendations/requirements for choosing
- * collection, core, etc identifiers.
+ * collection, core, etc. identifiers.
*
* <p>Identifiers are allowed to contain underscores, periods, hyphens, and alphanumeric characters.
*/
diff --git a/solr/solrj/src/java/org/apache/solr/cluster/api/Resource.java b/solr/solrj/src/java/org/apache/solr/cluster/api/Resource.java
index 0170de6e4e8..13548f6a822 100644
--- a/solr/solrj/src/java/org/apache/solr/cluster/api/Resource.java
+++ b/solr/solrj/src/java/org/apache/solr/cluster/api/Resource.java
@@ -23,7 +23,7 @@ import org.apache.solr.common.SolrException;
/** A binary resource. The impl is agnostic of the content type */
public interface Resource {
- /** This is a full path. e.g schema.xml , solrconfig.xml , lang/stopwords.txt etc */
+ /** This is a full path. e.g schema.xml, solrconfig.xml, lang/stopwords.txt etc */
String name();
/**
diff --git a/solr/solrj/src/java/org/apache/solr/cluster/api/SimpleMap.java b/solr/solrj/src/java/org/apache/solr/cluster/api/SimpleMap.java
index 2b768a6f6bb..4398d12742f 100644
--- a/solr/solrj/src/java/org/apache/solr/cluster/api/SimpleMap.java
+++ b/solr/solrj/src/java/org/apache/solr/cluster/api/SimpleMap.java
@@ -28,7 +28,7 @@ import org.apache.solr.common.MapWriter;
/**
* A simplified read-only key-value structure. It is designed to support large datasets without
- * consuming lot of memory The objective is to provide implementations that are cheap and memory
+ * consuming a lot of memory The objective is to provide implementations that are cheap and memory
* efficient to implement and consume. The keys are always {@link CharSequence} objects, The values
* can be of any type
*/
diff --git a/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java b/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java
index 52bf65d043b..be86c1e5c7b 100644
--- a/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java
+++ b/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java
@@ -52,8 +52,8 @@ public interface ConfigNode {
}
/**
- * Child by name or return an empty node if null if there are multiple values , it returns the
- * first elem This never returns a null
+ * Child by name or return an empty node if null. If there are multiple values, it returns the
+ * first element. This never returns a null.
*/
default ConfigNode get(String name) {
ConfigNode child = child(null, name);
diff --git a/solr/solrj/src/java/org/apache/solr/common/EnumFieldValue.java b/solr/solrj/src/java/org/apache/solr/common/EnumFieldValue.java
index 88f9f661f96..ec61abe5845 100644
--- a/solr/solrj/src/java/org/apache/solr/common/EnumFieldValue.java
+++ b/solr/solrj/src/java/org/apache/solr/common/EnumFieldValue.java
@@ -19,7 +19,7 @@ package org.apache.solr.common;
import java.io.Serializable;
/**
- * Represents a Enum field value, which includes integer value (indicating the sort order) and
+ * Represents an Enum field value, which includes integer value (indicating the sort order) and
* string (displayed) value. Note: this class has a natural ordering that is inconsistent with
* equals
*/
diff --git a/solr/solrj/src/java/org/apache/solr/common/NavigableObject.java b/solr/solrj/src/java/org/apache/solr/common/NavigableObject.java
index 188ee18a5cf..7241f792aaa 100644
--- a/solr/solrj/src/java/org/apache/solr/common/NavigableObject.java
+++ b/solr/solrj/src/java/org/apache/solr/common/NavigableObject.java
@@ -23,7 +23,7 @@ import org.apache.solr.common.util.Utils;
/**
* This class contains helper methods for navigating deeply nested Objects. Keep in mind that it may
- * be expensive depending on the underlying implementation. each level needs an extra lookup and the
+ * be expensive depending on the underlying implementation. Each level needs an extra lookup and the
* lookup may be as expensive as O(log(n)) to O(n) depending on the underlying impl
*/
public interface NavigableObject {
diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrCloseableLatch.java b/solr/solrj/src/java/org/apache/solr/common/SolrCloseableLatch.java
index e3e15937a1b..630993546a2 100644
--- a/solr/solrj/src/java/org/apache/solr/common/SolrCloseableLatch.java
+++ b/solr/solrj/src/java/org/apache/solr/common/SolrCloseableLatch.java
@@ -22,7 +22,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
/**
- * This class mimicks the operation of {@link java.util.concurrent.CountDownLatch}, but it also
+ * This class mimics the operation of {@link java.util.concurrent.CountDownLatch}, but it also
* periodically checks the state of the provided {@link SolrCloseable} and terminates the wait if
* it's closed by throwing an {@link InterruptedException}.
*/
diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrException.java b/solr/solrj/src/java/org/apache/solr/common/SolrException.java
index 2bcab2cab3a..e19883539ff 100644
--- a/solr/solrj/src/java/org/apache/solr/common/SolrException.java
+++ b/solr/solrj/src/java/org/apache/solr/common/SolrException.java
@@ -30,7 +30,7 @@ public class SolrException extends RuntimeException {
private final Map<String, String> mdcContext;
/**
- * This list of valid HTTP Status error codes that Solr may return in the case of a "Server Side"
+ * This list of valid HTTP Status error codes that Solr may return when there is a "Server Side"
* error.
*
* @since solr 1.2
@@ -95,7 +95,7 @@ public class SolrException extends RuntimeException {
/**
* The HTTP Status code associated with this Exception. For SolrExceptions thrown by Solr "Server
- * Side", this should valid {@link ErrorCode}, however client side exceptions may contain an
+ * Side", this should be a valid {@link ErrorCode}, however client side exceptions may contain an
* arbitrary error code based on the behavior of the Servlet Container hosting Solr, or any HTTP
* Proxies that may exist between the client and the server.
*
diff --git a/solr/solrj/src/java/org/apache/solr/common/ToleratedUpdateError.java b/solr/solrj/src/java/org/apache/solr/common/ToleratedUpdateError.java
index a99605f12f3..20a9c07e574 100644
--- a/solr/solrj/src/java/org/apache/solr/common/ToleratedUpdateError.java
+++ b/solr/solrj/src/java/org/apache/solr/common/ToleratedUpdateError.java
@@ -49,7 +49,7 @@ public final class ToleratedUpdateError {
/**
* Given a 'maxErrors' value such that<code>-1 &lt;= maxErrors &lt;= {@link Integer#MAX_VALUE}
* </code> this method returns the original input unless it is {@link Integer#MAX_VALUE} in which
- * case <code>-1</code> is returned for user convinience. Input of <code>maxErrors &lt; -1</code>
+ * case <code>-1</code> is returned for user convenience. Input of <code>maxErrors &lt; -1</code>
* will trip an assertion and otherwise have undefined behavior.
*
* @see #getEffectiveMaxErrors
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
index 5f7a23f2ed0..b1d8782cb10 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
@@ -438,7 +438,7 @@ public class ClusterState implements MapWriter {
}
/**
- * Return the DocCollection, always refetching if lazy. Equivalent to get(false)
+ * Return the DocCollection, always re-fetching if lazy. Equivalent to get(false)
*
* @return The collection state modeled in zookeeper
*/
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStatePredicate.java b/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStatePredicate.java
index af0ba278c0f..db9ea7cef17 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStatePredicate.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStatePredicate.java
@@ -20,7 +20,7 @@ package org.apache.solr.common.cloud;
import java.util.Set;
/**
- * Interface to determine if a set of liveNodes and a collection's state matches some expecatations.
+ * Interface to determine if a set of liveNodes and a collection's state matches some expectations.
*
* @see "ZkStateReader#waitForState(String, long, TimeUnit, CollectionStatePredicate)"
* @see "ZkStateReader#waitForState(String, long, TimeUnit, Predicate)"
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/CompositeIdRouter.java b/solr/solrj/src/java/org/apache/solr/common/cloud/CompositeIdRouter.java
index 9094ddd84e8..38ea73b0925 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/CompositeIdRouter.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/CompositeIdRouter.java
@@ -40,7 +40,7 @@ import org.apache.solr.common.util.Hash;
* app/2!user/4!uniqueid
* </pre>
*
- * Lets say you had a set of records you want to index together such as a contact in a database,
+ * Let's say you had a set of records you want to index together such as a contact in a database,
* using a prefix of contact!contactid would allow all contact ids to be bucketed together.
*
* <pre>
@@ -99,7 +99,7 @@ public class CompositeIdRouter extends HashBasedRouter {
/**
* Parse out the route key from {@code id} up to and including the {@link #SEPARATOR}, returning
- * it's length. If no route key is detected then 0 is returned.
+ * its length. If no route key is detected then 0 is returned.
*/
public int getRouteKeyWithSeparator(byte[] id, int idOffset, int idLength) {
final byte SEPARATOR_BYTE = (byte) CompositeIdRouter.SEPARATOR;
@@ -323,7 +323,7 @@ public class CompositeIdRouter extends HashBasedRouter {
return ranges;
}
- /** Helper class to calculate parts, masks etc for an id. */
+ /** Helper class to calculate parts, masks etc. for an id. */
protected static class KeyParser {
String key;
int[] numBits;
@@ -347,7 +347,7 @@ public class CompositeIdRouter extends HashBasedRouter {
if (-1 == secondSeparatorPos) {
partsList.add(key.substring(firstSeparatorPos + 1));
} else if (secondSeparatorPos == lastPos) {
- // Don't make any more parts if the key has exactly two separators and
+ // Don't make any more parts if the key has exactly two separators, and
// they're the last two chars - back-compatibility with the behavior of
// String.split() - see SOLR-6257.
if (firstSeparatorPos < secondSeparatorPos - 1) {
@@ -406,7 +406,7 @@ public class CompositeIdRouter extends HashBasedRouter {
// 0xF0000000 0xFfffffff
if ((masks[0] == 0 && !triLevel) || (masks[0] == 0 && masks[1] == 0 && triLevel)) {
- // no bits used from first part of key.. the code above will produce 0x000000000->0xffffffff
+ // no bits used from first part of key, the code above will produce 0x000000000->0xffffffff
// which only works on unsigned space, but we're using signed space.
lowerBound = Integer.MIN_VALUE;
upperBound = Integer.MAX_VALUE;
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java b/solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java
index 490a0a21eda..3c8ff93b816 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java
@@ -237,7 +237,7 @@ public abstract class DocRouter {
/**
* This method is consulted to determine what slices should be queried for a request when an
- * explicit shards parameter was not used. This method only accepts a single shard key (or null).
+ * explicit shards' parameter was not used. This method only accepts a single shard key (or null).
* If you have a comma separated list of shard keys, call getSearchSlices
*/
public abstract Collection<Slice> getSearchSlicesSingle(
@@ -245,7 +245,7 @@ public abstract class DocRouter {
/**
* This method is consulted to determine what search range (the part of the hash ring) should be
- * queried for a request when an explicit shards parameter was not used. This method only accepts
+ * queried for a request when an explicit shards' parameter was not used. This method only accepts
* a single shard key (or null).
*/
public Range getSearchRangeSingle(String shardKey, SolrParams params, DocCollection collection) {
@@ -263,7 +263,7 @@ public abstract class DocRouter {
/**
* This method is consulted to determine what slices should be queried for a request when an
- * explicit shards parameter was not used. This method accepts a multi-valued shardKeys parameter
+ * explicit shards' parameter was not used. This method accepts a multi-valued shardKeys parameter
* (normally comma separated from the shard.keys request parameter) and aggregates the slices
* returned by getSearchSlicesSingle for each shardKey.
*/
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/Replica.java b/solr/solrj/src/java/org/apache/solr/common/cloud/Replica.java
index b3019edc794..e3dfa9dc209 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/Replica.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/Replica.java
@@ -56,7 +56,7 @@ public class Replica extends ZkNodeProps implements MapWriter {
* trying to move to {@link State#RECOVERING}.
*
* <p><b>NOTE</b>: a replica's state may appear DOWN in ZK also when the node it's hosted on
- * gracefully shuts down. This is a best effort though, and should not be relied on.
+ * gracefully shuts down. This is a "best effort" though, and should not be relied on.
*/
DOWN("D"),
@@ -67,10 +67,10 @@ public class Replica extends ZkNodeProps implements MapWriter {
RECOVERING("R"),
/**
- * Recovery attempts have not worked, something is not right.
+ * Recovery attempts has not worked, something is not right.
*
* <p><b>NOTE</b>: This state doesn't matter if the node is not part of {@code /live_nodes} in
- * ZK; in that case the node is not part of the cluster and it's state should be discarded.
+ * ZK; in that case the node is not part of the cluster, and it's state should be discarded.
*/
RECOVERY_FAILED("F");
@@ -113,7 +113,7 @@ public class Replica extends ZkNodeProps implements MapWriter {
*/
TLOG(true, true, true, CollectionAdminParams.TLOG_REPLICAS),
/**
- * Doesn’t index or writes to transaction log. Just replicates from {@link Type#NRT} or {@link
+ * Does not index or writes to transaction log. Just replicates from {@link Type#NRT} or {@link
* Type#TLOG} replicas. {@link Type#PULL} replicas can’t become shard leaders (i.e., if there
* are only pull replicas in the collection at some point, updates will fail same as if there is
* no leaders, queries continue to work), so they don’t even participate in elections.
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ReplicaCount.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ReplicaCount.java
index a76f09d163d..3235671b5e0 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ReplicaCount.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ReplicaCount.java
@@ -151,7 +151,7 @@ public final class ReplicaCount {
return countByType.containsKey(type);
}
- /** Returns the replica types for which a number of replicas was explicitely defined. */
+ /** Returns the replica types for which a number of replicas was explicitly defined. */
public Set<Replica.Type> keySet() {
return countByType.keySet();
}
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCoreNodeProps.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCoreNodeProps.java
index 5e789efb7eb..9c060511445 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCoreNodeProps.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCoreNodeProps.java
@@ -48,7 +48,7 @@ public class ZkCoreNodeProps {
}
private static String getBaseUrl(ZkNodeProps nodeProps) {
- // if storing baseUrl in ZK is enabled and it's stored, just use what's stored, i.e. no
+ // if storing baseUrl in ZK is enabled, and it's stored, just use what's stored, i.e. no
// self-healing here
String baseUrl = nodeProps.getStr(ReplicaStateProps.BASE_URL);
if (baseUrl == null) {
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkNodeProps.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkNodeProps.java
index b187e475fe8..1844ad27a8b 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkNodeProps.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkNodeProps.java
@@ -58,7 +58,7 @@ public class ZkNodeProps implements MapWriter {
}
/**
- * Constructor that populates the from array of Strings in form key1, value1, key2, value2, ...,
+ * Constructor that populates from an array of Strings in form key1, value1, key2, value2, ...,
* keyN, valueN
*/
public ZkNodeProps(String... keyVals) {
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/AnalysisParams.java b/solr/solrj/src/java/org/apache/solr/common/params/AnalysisParams.java
index 6b04e6d2298..d50db80de03 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/AnalysisParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/AnalysisParams.java
@@ -43,6 +43,6 @@ public interface AnalysisParams {
/** Holds a comma-separated list of field types that the analysis should be peformed for. */
static final String FIELD_TYPE = PREFIX + ".fieldtype";
- /** Hodls a comma-separated list of field named that the analysis should be performed for. */
+ /** Holds a comma-separated list of field named that the analysis should be performed for. */
static final String FIELD_VALUE = PREFIX + ".fieldvalue";
}
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/AppendedSolrParams.java b/solr/solrj/src/java/org/apache/solr/common/params/AppendedSolrParams.java
index 984bffcb537..f88775b5f86 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/AppendedSolrParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/AppendedSolrParams.java
@@ -18,7 +18,7 @@ package org.apache.solr.common.params;
/**
* SolrParams wrapper which acts similar to DefaultSolrParams except that it "appends" the values of
- * multi-value params from both sub instances, so that all of the values are returned.
+ * multi-value params from both sub instances, so that all the values are returned.
*/
public class AppendedSolrParams extends DefaultSolrParams {
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
index 4e94b1d97c6..198bd7ef79c 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
@@ -131,7 +131,8 @@ public interface CommonParams {
String TRACK = "track";
/**
- * boolean indicating whether score explanations should structured (true), or plain text (false)
+ * boolean indicating whether score explanations should be structured (true), or plain text
+ * (false)
*/
String EXPLAIN_STRUCT = "debug.explain.structured";
@@ -153,7 +154,7 @@ public interface CommonParams {
*/
String STREAM_CONTENTTYPE = "stream.contentType";
- /** Whether or not the search may be terminated early within a segment. */
+ /** Whether the search may be terminated early within a segment. */
String SEGMENT_TERMINATE_EARLY = "segmentTerminateEarly";
boolean SEGMENT_TERMINATE_EARLY_DEFAULT = false;
@@ -167,7 +168,7 @@ public interface CommonParams {
/** Timeout value in milliseconds. If not set, or the value is &lt; 0, there is no timeout. */
String TIME_ALLOWED = "timeAllowed";
- /** Whether or not the search may use the multi-threaded logic */
+ /** Whether the search may use the multi-threaded logic */
String MULTI_THREADED = "multiThreaded";
/**
@@ -279,8 +280,8 @@ public interface CommonParams {
/**
* Used as a local param on filter queries in conjunction with cache=false. Filters are checked in
- * order, from smallest cost to largest. If cost&gt;=100 and the query implements PostFilter, then
- * that interface will be used to do post query filtering.
+ * order, from the smallest cost to largest. If cost&gt;=100 and the query implements PostFilter,
+ * then that interface will be used to do post query filtering.
*/
String COST = "cost";
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java
index 4d9427f31bb..a85b3fe9ead 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java
@@ -179,7 +179,7 @@ public abstract class CoreAdminParams {
REJOINLEADERELECTION,
// internal API used by force shard leader election
FORCEPREPAREFORLEADERSHIP,
- // Internal APIs to backup and restore a core
+ // Internal APIs to back up and restore a core
BACKUPCORE,
RESTORECORE,
INSTALLCOREDATA,
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CursorMarkParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CursorMarkParams.java
index e74bd3e856f..d641d3337e5 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CursorMarkParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CursorMarkParams.java
@@ -37,7 +37,7 @@ public interface CursorMarkParams {
/**
* Special value for {@link #CURSOR_MARK_PARAM} indicating that cursor functionality should be
- * used, and a new cursor value should be computed afte the last result, but that currently the
+ * used, and a new cursor value should be computed after the last result, but that currently the
* "first page" of results is being requested
*/
public static final String CURSOR_MARK_START = "*";
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/DefaultSolrParams.java b/solr/solrj/src/java/org/apache/solr/common/params/DefaultSolrParams.java
index 9f95dd5f34e..1dc2e2daed9 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/DefaultSolrParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/DefaultSolrParams.java
@@ -47,7 +47,7 @@ public class DefaultSolrParams extends SolrParams {
public Iterator<String> getParameterNamesIterator() {
// We need to compute the set of all param names in advance
// So we don't wind up with an iterator that returns the same
- // String more then once (SOLR-6780)
+ // String more than once (SOLR-6780)
LinkedHashSet<String> allKeys = new LinkedHashSet<>();
for (SolrParams p : new SolrParams[] {params, defaults}) {
Iterator<String> localKeys = p.getParameterNamesIterator();
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java b/solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
index d6bc7273bcb..53fce3670bd 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
@@ -55,7 +55,7 @@ public interface FacetParams {
public static final String FACET_METHOD_uif = "uif";
/**
- * Any lucene formated queries the user would like to use for Facet Constraint Counts
+ * Any lucene formatted queries the user would like to use for Facet Constraint Counts
* (multi-value)
*/
public static final String FACET_QUERY = FACET + ".query";
@@ -222,7 +222,7 @@ public interface FacetParams {
public static final String FACET_DATE_INCLUDE = FACET_DATE + ".include";
/**
- * Any numerical field whose terms the user wants to enumerate over Facet Contraint Counts for
+ * Any numerical field whose terms the user wants to enumerate over Facet Constraint Counts for
* selected ranges.
*/
public static final String FACET_RANGE = FACET + ".range";
@@ -309,7 +309,7 @@ public interface FacetParams {
* <pre>["-150 10" TO "-100 30"]</pre>
*
* (the first is bottom-left and second is bottom-right, both of which are parsed as points are
- * parsed). OR, any WKT can be provided and it's bounding box will be taken.
+ * parsed). OR, any WKT can be provided, and it's bounding box will be taken.
*/
public static final String FACET_HEATMAP_GEOM = FACET_HEATMAP + ".geom";
@@ -330,7 +330,7 @@ public interface FacetParams {
* Used to determine the heatmap grid level to compute (optional). It has the same interpretation
* of maxDistErr or distErr with RPT. It's an absolute distance (in units of what's specified on
* the field type) that a grid square must maximally fit into (width &amp; height). It can be used
- * to to more explicitly specify the maximum grid square size without knowledge of what particular
+ * to more explicitly specify the maximum grid square size without knowledge of what particular
* grid levels translate to. This can in turn be used with knowledge of the size of 'bbox' to get
* a target minimum number of grid cells. Mutually exclusive with distErrPct &amp; gridLevel.
*/
@@ -423,11 +423,11 @@ public interface FacetParams {
}
/**
- * Convinience method for parsing the param value according to the correct semantics and
+ * Convenience method for parsing the param value according to the correct semantics and
* applying the default of "LOWER"
*/
public static EnumSet<FacetRangeInclude> parseParam(final String[] param) {
- // short circut for default behavior
+ // short circuit for default behavior
if (null == param || 0 == param.length) return EnumSet.of(LOWER);
// build up set containing whatever is specified
@@ -436,7 +436,7 @@ public interface FacetParams {
include.add(FacetRangeInclude.get(o));
}
- // if set contains all, then we're back to short circuting
+ // if set contains all, then we're back to short-circuiting
if (include.contains(FacetRangeInclude.ALL)) return EnumSet.allOf(FacetRangeInclude.class);
// use whatever we've got.
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/GroupParams.java b/solr/solrj/src/java/org/apache/solr/common/params/GroupParams.java
index 9dad710181b..43d5380a7b4 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/GroupParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/GroupParams.java
@@ -47,8 +47,8 @@ public interface GroupParams {
// Note: Since you can supply multiple fields to group on, but only have a facets for the whole
// result. It only makes sense to me to support these parameters for the first group.
/**
- * Whether the docSet (for example for faceting) should be based on plain documents (a.k.a
- * UNGROUPED) or on the groups (a.k.a GROUPED). The docSet will only the most relevant documents
+ * Whether the docSet (for example for faceting) should be based on plain documents (a.k.a.
+ * UNGROUPED) or on the groups (a.k.a. GROUPED). The docSet will only the most relevant documents
* per group. It is if you query for everything with group.limit=1
*/
public static final String GROUP_TRUNCATE = GROUP + ".truncate";
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/ModifiableSolrParams.java b/solr/solrj/src/java/org/apache/solr/common/params/ModifiableSolrParams.java
index 9c3c0d2a4a9..25535f06942 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/ModifiableSolrParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/ModifiableSolrParams.java
@@ -51,7 +51,7 @@ public class ModifiableSolrParams extends SolrParams {
}
/**
- * If the input params are of type MofifiableSolrParams, returns the input, otherwise, constructs
+ * If the input params are of type ModifiableSolrParams, returns the input, otherwise, constructs
* a new ModifiableSolrParams, copying values from the given params. If params is null, returns an
* empty ModifiableSolrParams instance.
*/
@@ -129,8 +129,8 @@ public class ModifiableSolrParams extends SolrParams {
}
/**
- * Add all of the params provided in the parameter to <em>this</em> params. Any current value(s)
- * for the same key will be overridden.
+ * Add all the params provided in the parameter to <em>this</em> params. Any current value(s) for
+ * the same key will be overridden.
*/
public void add(SolrParams params) {
for (Map.Entry<String, String[]> pair : params) {
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java b/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java
index 875b17c87fe..273db7651e8 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java
@@ -45,7 +45,7 @@ public interface ShardParams {
/**
* The requested URL for this shard
*
- * @deprecated This was an internally used param never ment for clients to specify; it is no
+ * @deprecated This was an internally used param, never meant for clients to specify; it is no
* longer used by Solr.
*/
@Deprecated String SHARD_URL = "shard.url";
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java b/solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java
index a06933ed099..912ee39c27e 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java
@@ -240,9 +240,7 @@ public abstract class SolrParams
}
}
- /**
- * Returns int value of the the param or default value for int - zero (<code>0</code>) if not set.
- */
+ /** Returns int value of the param or default value for int - zero (<code>0</code>) if not set. */
public int getPrimitiveInt(String param) {
return getInt(param, 0);
}
@@ -510,7 +508,7 @@ public abstract class SolrParams
if (values.length == 1) {
result.add(name, values[0]);
} else {
- // currently no reason not to use the same array
+ // currently, no reason not to use the same array
result.add(name, values);
}
}
@@ -543,7 +541,7 @@ public abstract class SolrParams
}
/**
- * Returns this SolrParams as a properly URL encoded string, starting with {@code "?"}, if not
+ * Returns this SolrParams as a proper URL encoded string, starting with {@code "?"}, if not
* empty.
*/
public String toQueryString() {
@@ -570,7 +568,7 @@ public abstract class SolrParams
/**
* Generates a local-params string of the form <code>{! name=value name2=value2}</code>,
- * Protecting (with out any quoting or escaping) any values that start with <code>$</code> (param
+ * Protecting (without any quoting or escaping) any values that start with <code>$</code> (param
* references).
*/
public String toLocalParamsString() {
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/SpellingParams.java b/solr/solrj/src/java/org/apache/solr/common/params/SpellingParams.java
index e6551ea30fb..db03b003098 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/SpellingParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/SpellingParams.java
@@ -51,9 +51,9 @@ public interface SpellingParams {
/**
* The maximum number of hits the request can return in order to both generate spelling
* suggestions and set the "correctlySpelled" element to "false". This can be specified either as
- * a whole number number of documents, or it can be expressed as a fractional percentage of
- * documents returned by a chosen filter query. By default, the chosen filter is the most
- * restrictive fq clause. This can be overridden with {@link
+ * a whole number of documents, or it can be expressed as a fractional percentage of documents
+ * returned by a chosen filter query. By default, the chosen filter is the most restrictive fq
+ * clause. This can be overridden with {@link
* SpellingParams#SPELLCHECK_MAX_RESULTS_FOR_SUGGEST_FQ} .
*
* <p>If left unspecified, the default behavior will prevail. That is, "correctlySpelled" will be
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/TermsParams.java b/solr/solrj/src/java/org/apache/solr/common/params/TermsParams.java
index ae2b19950e8..d9dc41d1f4a 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/TermsParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/TermsParams.java
@@ -106,7 +106,7 @@ public interface TermsParams {
/**
* Optional. If true, return the raw characters of the indexed term, regardless of if it is
- * readable. For instance, the index form of numeric numbers is not human readable. The default is
+ * readable. For instance, the index form of numeric numbers is not human-readable. The default is
* false.
*/
String TERMS_RAW = TERMS_PREFIX + "raw";
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/UpdateParams.java b/solr/solrj/src/java/org/apache/solr/common/params/UpdateParams.java
index 48dab1a8cae..f14252fb970 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/UpdateParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/UpdateParams.java
@@ -73,7 +73,7 @@ public interface UpdateParams {
/**
* If set to true, then Solr must fail to process any Atomic Update which can not be done
- * "In-Place" with out re-indexing the entire document.
+ * "In-Place" without re-indexing the entire document.
*/
public static final String REQUIRE_PARTIAL_DOC_UPDATES_INPLACE = "update.partial.requireInPlace";
}
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/ByteArrayUtf8CharSequence.java b/solr/solrj/src/java/org/apache/solr/common/util/ByteArrayUtf8CharSequence.java
index 8379b5051c1..c4baf6326e8 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/ByteArrayUtf8CharSequence.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/ByteArrayUtf8CharSequence.java
@@ -73,7 +73,7 @@ public class ByteArrayUtf8CharSequence implements Utf8CharSequence {
}
/**
- * this is for internal use to get a cached string value. returns null if There is no cached
+ * this is for internal use, to get a cached string value. returns null if there is no cached
* String value
*/
public String getStringOrNull() {
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/ByteUtils.java b/solr/solrj/src/java/org/apache/solr/common/util/ByteUtils.java
index 824ab4dbb15..b7a13dca974 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/ByteUtils.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/ByteUtils.java
@@ -26,7 +26,7 @@ public class ByteUtils {
public static final int MAX_UTF8_BYTES_PER_CHAR = 3;
/**
- * Converts utf8 to utf16 and returns the number of 16 bit Java chars written. Full characters are
+ * Converts utf8 to utf16 and returns the number of 16-bit Java chars written. Full characters are
* read, even if this reads past the length passed (and can result in an ArrayOutOfBoundsException
* if invalid UTF8 is passed). Explicit checks for valid UTF8 are not performed. The char[] out
* should probably have enough room to hold the worst case of each byte becoming a Java char.
@@ -147,7 +147,7 @@ public class ByteUtils {
final int code = (int) s.charAt(i);
if (upto > scratch.length - 4) {
- // a code point may take upto 4 bytes and we don't have enough space, so reset
+ // a code point may take up to 4 bytes, and we don't have enough space, so reset
totalBytes += upto;
if (fos == null) throw new IOException("buffer over flow");
fos.write(scratch, 0, upto);
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/CommonTestInjection.java b/solr/solrj/src/java/org/apache/solr/common/util/CommonTestInjection.java
index f6f75a8ef32..3acf4d75163 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/CommonTestInjection.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/CommonTestInjection.java
@@ -54,9 +54,9 @@ public class CommonTestInjection {
}
/**
- * Set test delay (sleep) in unit of millisec
+ * Set test delay (sleep) in unit of milliseconds
*
- * @param delay delay in millisec, null to remove such delay
+ * @param delay delay in milliseconds, null to remove such delay
*/
public static void setDelay(Integer delay) {
CommonTestInjection.delay = delay;
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/ContentStream.java b/solr/solrj/src/java/org/apache/solr/common/util/ContentStream.java
index 0c3cbbbfcdb..7c1de75568e 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/ContentStream.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/ContentStream.java
@@ -55,7 +55,7 @@ public interface ContentStream {
* work. The runtime behavior for additional calls is undefined.
*
* <p>Note: you must call <code>getStream()</code> or <code>getReader()</code> before the
- * attributes (name, contentType, etc) are guaranteed to be set. Streams may be lazy loaded only
+ * attributes (name, contentType, etc.) are guaranteed to be set. Streams may be lazy loaded only
* when this method is called.
*/
InputStream getStream() throws IOException;
@@ -77,7 +77,7 @@ public interface ContentStream {
* work. The runtime behavior for additional calls is undefined.
*
* <p>Note: you must call <code>getStream()</code> or <code>getReader()</code> before the
- * attributes (name, contentType, etc) are guaranteed to be set. Streams may be lazy loaded only
+ * attributes (name, contentType, etc.) are guaranteed to be set. Streams may be lazy loaded only
* when this method is called.
*/
Reader getReader() throws IOException;
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/ContentStreamBase.java b/solr/solrj/src/java/org/apache/solr/common/util/ContentStreamBase.java
index 48999ef79f0..321b08a0f24 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/ContentStreamBase.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/ContentStreamBase.java
@@ -245,7 +245,7 @@ public abstract class ContentStreamBase implements ContentStream {
return new ByteArrayInputStream(str.getBytes(DEFAULT_CHARSET));
}
- /** If an charset is defined (by the contentType) use that, otherwise use a StringReader */
+ /** If a charset is defined (by the contentType) use that, otherwise use a StringReader */
@Override
public Reader getReader() throws IOException {
String charset = getCharsetFromContentType(contentType);
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/DOMUtil.java b/solr/solrj/src/java/org/apache/solr/common/util/DOMUtil.java
index 9b2e7583cdf..840c64b5d87 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/DOMUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/DOMUtil.java
@@ -308,7 +308,7 @@ public class DOMUtil {
match the definition of how textContent should behave
according to the DOM Level-3 Core documentation - which
specifies that the Attr's children should have their
- textContent concated (Attr's can have a single child which
+ textContent contacted (Attr's can have a single child which
is either Text node or an EntityReference). In practice,
DOM implementations do not seem to use child nodes of
Attributes, storing the "text" directly as the nodeValue.
@@ -346,7 +346,7 @@ public class DOMUtil {
/**
* Replaces ${property[:default value]} references in all attributes and text nodes of supplied
- * node. If the property is not defined neither in the given Properties instance nor in
+ * node. If the property is not defined, either in the given Properties instance nor in
* System.getProperty and no default value is provided, a runtime exception is thrown.
*
* @param node DOM node to walk for substitutions
@@ -444,7 +444,7 @@ public class DOMUtil {
fragments.add("$");
prev = pos + 1;
} else if (value.charAt(pos + 1) != '{') {
- // peek ahead to see if the next char is a property or not
+ // peek ahead to see if the next char is a property or
// not a property: insert the char as a literal
/*
fragments.addElement(value.substring(pos + 1, pos + 2));
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/DataEntry.java b/solr/solrj/src/java/org/apache/solr/common/util/DataEntry.java
index 46ec680d96f..a3fd6ba9883 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/DataEntry.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/DataEntry.java
@@ -22,9 +22,9 @@ import java.io.InputStream;
/**
* This represents a data entry in the payload/stream. There are multiple ways to consume the data
- * entry a) listen to it, if it's a container object, and get callbacks for each sub-entry b) read
+ * entry: 1) listen to it, if it's a container object, and get callbacks for each sub-entry 2) read
* as an object using the {{@link #val()}} method. Please note that it creates objects and expect
- * more memory usage c) read the corresponding primitive value Do not keep a reference of this
+ * more memory usage 3) read the corresponding primitive value Do not keep a reference of this
* Object beyond the scope where it is called. Read the relevant data out.
*/
public interface DataEntry {
@@ -80,7 +80,7 @@ public interface DataEntry {
Object ctx();
/**
- * If it is a non-primitive type type and size is known in advance
+ * If it is a non-primitive type and size is known in advance
*
* <p>if it's a map/list, it's the no:of items in this container
*
@@ -132,8 +132,8 @@ public interface DataEntry {
interface EntryListener {
/**
- * Callback for each entry in this container. once the method call returns, the entry object is
- * not valid anymore It is usually reused. If the object value is a {{@link Utf8CharSequence}}
+ * Callback for each entry in this container. Once the method call returns, the entry object is
+ * not valid anymore. It is usually reused. If the object value is a {{@link Utf8CharSequence}}
* do a {{@link Object#clone()}} because the object may be reused
*
* @param e The entry in the container
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java b/solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java
index b21a968adef..29873bf09b9 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java
@@ -65,8 +65,8 @@ public class ExecutorUtil {
}
/**
- * Any class which wants to carry forward the threadlocal values to the threads run by threadpools
- * must implement this interface and the implementation should be registered here
+ * Any class which wants to carry forward the thread local values to the threads run by thread
+ * pools must implement this interface and the implementation should be registered here
*/
public interface InheritableThreadLocalProvider {
/**
@@ -76,13 +76,13 @@ public class ExecutorUtil {
void store(AtomicReference<Object> ctx);
/**
- * This is invoked in the Threadpool thread. set the appropriate values in the threadlocal of
+ * This is invoked in the thread pool thread. set the appropriate values in the thread local of
* this thread.
*/
void set(AtomicReference<Object> ctx);
/**
- * This method is invoked in the threadpool thread after the execution clean all the variables
+ * This method is invoked in the thread pool thread after the execution clean all the variables
* set in the set method
*/
void clean(AtomicReference<Object> ctx);
@@ -110,7 +110,7 @@ public class ExecutorUtil {
* Shutdown the {@link ExecutorService} and wait for 60 seconds for the threads to complete. More
* detail on the waiting can be found in {@link #awaitTermination(ExecutorService)}.
*
- * @param pool The ExecutorService to shutdown and wait on
+ * @param pool The ExecutorService to shut down and wait on
*/
public static void shutdownAndAwaitTermination(ExecutorService pool) {
if (pool == null) return;
@@ -122,13 +122,13 @@ public class ExecutorUtil {
* Shutdown the {@link ExecutorService} and wait forever for the threads to complete. More detail
* on the waiting can be found in {@link #awaitTerminationForever(ExecutorService)}.
*
- * <p>This should likely not be used in {@code close()} methods, as we want to timebound when
+ * <p>This should likely not be used in {@code close()} methods, as we want to time bound when
* shutting down. However, sometimes {@link ExecutorService}s are used to submit a list of tasks
* and awaiting termination is akin to waiting on the list of {@link Future}s to complete. In that
* case, this method should be used as there is no inherent time bound to waiting on those tasks
* to complete.
*
- * @param pool The ExecutorService to shutdown and wait on
+ * @param pool The ExecutorService to shut down and wait on
*/
public static void shutdownAndAwaitTerminationForever(ExecutorService pool) {
if (pool == null) return;
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/FastInputStream.java b/solr/solrj/src/java/org/apache/solr/common/util/FastInputStream.java
index 79da8d35aa3..b54fc539165 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/FastInputStream.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/FastInputStream.java
@@ -27,7 +27,7 @@ public class FastInputStream extends DataInputInputStream {
protected final byte[] buf;
protected int pos;
protected int end;
- protected long readFromStream; // number of bytes read from the underlying inputstream
+ protected long readFromStream; // number of bytes read from the underlying input stream
public FastInputStream(InputStream in) {
// use default BUFSIZE of BufferedOutputStream so if we wrap that
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/GlobPatternUtil.java b/solr/solrj/src/java/org/apache/solr/common/util/GlobPatternUtil.java
index 32badc75c1c..2c370718701 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/GlobPatternUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/GlobPatternUtil.java
@@ -48,7 +48,7 @@ public class GlobPatternUtil {
int wcsIdx = 0;
final Deque<int[]> backtrack = new ArrayDeque<>(wcs.length);
- // loop around a backtrack stack, to handle complex * matching
+ // loop around a back track stack, to handle complex * matching
do {
if (!backtrack.isEmpty()) {
final int[] array = backtrack.pop();
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/Hash.java b/solr/solrj/src/java/org/apache/solr/common/util/Hash.java
index 05e9f291f0d..e327893b4d9 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/Hash.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/Hash.java
@@ -20,10 +20,10 @@ package org.apache.solr.common.util;
* Fast, well distributed, cross-platform hash functions.
*
* <p>Development background: I was surprised to discovered that there isn't a good cross-platform
- * hash function defined for strings. MD5, SHA, FVN, etc, all define hash functions over bytes,
+ * hash function defined for strings. MD5, SHA, FVN, etc., all define hash functions over bytes,
* meaning that it's under-specified for strings.
*
- * <p>So I set out to create a standard 32 bit string hash that would be well defined for
+ * <p>So I set out to create a standard 32 bit string hash that would be well-defined for
* implementation in all languages, have very high performance, and have very good hash properties
* such as distribution. After evaluating all the options, I settled on using Bob Jenkins' lookup3
* as a base. It's a well studied and very fast hash function, and the hashword variant can work
@@ -63,7 +63,7 @@ public class Hash {
* @param offset offset of the start of the key
* @param length length of the key
* @param initval initial value to fold into the hash
- * @return the 32 bit hash code
+ * @return the 32-bit hash code
*/
@SuppressWarnings("fallthrough")
public static int lookup3(int[] k, int offset, int length, int initval) {
@@ -77,7 +77,7 @@ public class Hash {
c += k[i + 2];
// mix(a,b,c)... Java needs "out" parameters!!!
- // Note: recent JVMs (Sun JDK6) turn pairs of shifts (needed to do a rotate)
+ // Note: recent JVMs (Sun JDK6) turn pairs of shifts (needed to do a rotate operation)
// into real x86 rotate instructions.
{
a -= c;
@@ -251,7 +251,7 @@ public class Hash {
if (i >= end) break;
// mix(a,b,c)... Java needs "out" parameters!!!
- // Note: recent JVMs (Sun JDK6) turn pairs of shifts (needed to do a rotate)
+ // Note: recent JVMs (Sun JDK6) turn pairs of shifts (needed to do a rotate operation)
// into real x86 rotate instructions.
{
a -= c;
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java b/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
index 83b6570e0d7..9a16ea5abbc 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
@@ -1250,7 +1250,7 @@ public class JavaBinCodec implements PushWriter {
* Examine and attempt to serialize the given object, using a {@link JavaBinCodec} to write it
* to a stream.
*
- * @param o the object that the caller wants serialized.
+ * @param o the object that the caller wants to be serialized.
* @param codec used to actually serialize {@code o}.
* @return the object {@code o} itself if it could not be serialized, or {@code null} if the
* whole object was successfully serialized.
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java b/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java
index 36ad860fb1b..86d3b94c236 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java
@@ -65,7 +65,7 @@ public class JsonRecordReader {
private JsonRecordReader() {}
/**
- * a '|' separated list of path expressions which define sub sections of the JSON stream that are
+ * a '|' separated list of path expressions which define subsections of the JSON stream that are
* to be emitted as separate records. It is possible to have multiple levels of split one for
* parent and one for child each child record (or a list of records) will be emitted as a part of
* the parent record with null as the key
@@ -164,7 +164,7 @@ public class JsonRecordReader {
private boolean useFqn = false;
public Node(String name, Node p) {
- // Create a basic Node, suitable for the mid portions of any path.
+ // Create a basic Node, suitable for the mid-portions of any path.
// Node.pathName and Node.name are set to same value.
this.name = name;
parent = p;
@@ -210,7 +210,7 @@ public class JsonRecordReader {
/**
* Build a Node tree structure representing all paths of interest to us. This must be done
- * before parsing of the JSON stream starts. Each node holds one portion of an path. Taking each
+ * before parsing of the JSON stream starts. Each node holds one portion of a path. Taking each
* path segment in turn this method walks the Node tree and finds where the new segment should
* be inserted. It creates a Node representing a field's name, PATH and some flags and inserts
* the Node into the Node tree.
@@ -306,7 +306,7 @@ public class JsonRecordReader {
* them against the new tag. If matched then "jump" to that node, otherwise ignore the tag.
*
* <p>Note, the list of // expressions found while walking back up the tree is cached in the
- * HashMap descendants. Then if the new tag is to be skipped, any inner child tags are compared
+ * HashMap descendants. Then, if the new tag is to be skipped, any inner child tags are compared
* against the cache and jumped to if matched.
*/
private void handleObjectStart(
@@ -319,17 +319,17 @@ public class JsonRecordReader {
throws IOException {
final boolean isRecordStarted = recordStarted || isRecord;
- Set<String> valuesAddedinThisFrame = null;
+ Set<String> valuesAddedInThisFrame = null;
if (isRecord || !recordStarted) {
// This Node is a match for an PATH from a forEach attribute,
- // prepare for the clean up that will occur when the record
+ // prepare for the cleanup that will occur when the record
// is emitted after its END_ELEMENT is matched
- valuesAddedinThisFrame = new HashSet<>();
- stack.push(valuesAddedinThisFrame);
+ valuesAddedInThisFrame = new HashSet<>();
+ stack.push(valuesAddedInThisFrame);
} else if (recordStarted) {
// This node is a child of some parent which matched against forEach
// attribute. Continue to add values to an existing record.
- valuesAddedinThisFrame = stack.peek();
+ valuesAddedInThisFrame = stack.peek();
}
class Wrapper extends MethodFrameWrapper {
@@ -410,7 +410,7 @@ public class JsonRecordReader {
Object val = parseSingleFieldValue(event, parser, runnable);
if (val != null) {
putValue(values, nameInRecord, val);
- valuesAddedinThisFrame.add(nameInRecord);
+ valuesAddedInThisFrame.add(nameInRecord);
}
} else {
@@ -440,7 +440,7 @@ public class JsonRecordReader {
}
} finally {
if ((isRecord() || !isRecordStarted)) {
- for (String fld : valuesAddedinThisFrame) {
+ for (String fld : valuesAddedInThisFrame) {
values.remove(fld);
}
}
@@ -509,7 +509,7 @@ public class JsonRecordReader {
} // end of class Node
/**
- * The path is split into segments using the '/' as a separator. However this method deals with
+ * The path is split into segments using the '/' as a separator. However, this method deals with
* special cases where there is a slash '/' character inside the attribute value e.g.
* x/@html='text/html'. We split by '/' but then reassemble things were the '/' appears within a
* quoted sub-string.
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java b/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java
index b5162019ab7..391a36884a3 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java
@@ -30,8 +30,8 @@ import java.util.function.Function;
/**
* A very basic and lightweight json schema parsing and data validation tool. This custom tool is
- * created because a) we need to support non json inputs b) to avoiding double parsing (this accepts
- * an already parsed json as a map) It validates most aspects of json schema but it is NOT A FULLY
+ * created because 1) we need to support non json inputs 2) to avoiding double parsing (this accepts
+ * an already parsed json as a map). It validates most aspects of json schema, but it is NOT A FULLY
* COMPLIANT JSON schema parser or validator. This validator borrow some design's idea from
* https://github.com/networknt/json-schema-validator
*/
@@ -60,7 +60,7 @@ public class JsonSchemaValidator {
}
}
- // This is a heterogeneous type, there's probably imrpovements to be had by using some concrete
+ // This is a heterogeneous type, there's probably improvements to be had by using some concrete
// types instead
static final Map<String, Function<Pair<Map<?, ?>, ?>, Validator<?>>> VALIDATORS = new HashMap<>();
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JsonTextWriter.java b/solr/solrj/src/java/org/apache/solr/common/util/JsonTextWriter.java
index ddd984cc689..9cb39b09320 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/JsonTextWriter.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/JsonTextWriter.java
@@ -75,7 +75,7 @@ public interface JsonTextWriter extends TextWriter {
@Override
default void writeStr(String name, String val, boolean needsEscaping) throws IOException {
- // it might be more efficient to use a stringbuilder or write substrings
+ // it might be more efficient to use a StringBuilder or write substrings
// if writing chars to the stream is slow.
if (needsEscaping) {
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/MurmurHash2.java b/solr/solrj/src/java/org/apache/solr/common/util/MurmurHash2.java
index 9547ac414f6..a16db14abea 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/MurmurHash2.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/MurmurHash2.java
@@ -77,12 +77,12 @@ public final class MurmurHash2 {
}
/**
- * Generates 32 bit hash from byte array with default seed value.
+ * Generates 32-bit hash from byte array with default seed value.
*
* @param data byte array to hash
* @param offset the start position in the array to hash
* @param len length of the array elements to hash
- * @return 32 bit hash of the given array
+ * @return 32-bit hash of the given array
*/
public static final int hash32(final byte[] data, int offset, int len) {
return MurmurHash2.hash(data, 0x9747b28c, offset, len);
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/NamedList.java b/solr/solrj/src/java/org/apache/solr/common/util/NamedList.java
index b6587746173..aef0edaa4cf 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/NamedList.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/NamedList.java
@@ -138,7 +138,7 @@ public class NamedList<T>
/**
* Method to serialize Map.Entry&lt;String, ?&gt; to a List in which the even indexed elements
- * (0,2,4. ..etc) are Strings and odd elements (1,3,5,) are of the type "T".
+ * (0,2,4, etc.) are Strings and odd elements (1,3,5,) are of the type "T".
*
* <p>NOTE: This a temporary placeholder method until the guts of the class are actually replaced
* by List&lt;String, ?&gt;.
@@ -343,7 +343,7 @@ public class NamedList<T>
* assign it to value.
*
* On the next loop, we check whether the retrieved value is a NamedList.
- * If it is, then we drop down to that NamedList, grab the value of the
+ * If it is, then we drop to that NamedList, grab the value of the
* next key, and start the loop over. If it is not a NamedList, then we
* assign the value to null and break out of the loop.
*
@@ -690,7 +690,7 @@ public class NamedList<T>
/**
* Used for getting a boolean argument from a NamedList object. If the name is not present,
* returns null. If there is more than one value with that name, or if the value found is not a
- * Boolean or a String, throws an exception. If there is only one value present and it is a
+ * Boolean or a String, throws an exception. If there is only one value present, and it is a
* Boolean or a String, the value is removed and returned as a Boolean. If an exception is thrown,
* the NamedList is not modified. See {@link #removeAll(String)} and {@link
* #removeConfigArgs(String)} for additional ways of gathering configuration information from a
@@ -712,7 +712,7 @@ public class NamedList<T>
/**
* Used for getting a boolean argument from a NamedList object. If the name is not present,
* returns null. If there is more than one value with that name, or if the value found is not a
- * Boolean or a String, throws an exception. If there is only one value present and it is a
+ * Boolean or a String, throws an exception. If there is only one value present, and it is a
* Boolean or a String, the value is returned as a Boolean. The NamedList is not modified. See
* {@link #remove(String)}, {@link #removeAll(String)} and {@link #removeConfigArgs(String)} for
* additional ways of gathering configuration information from a NamedList.
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/PropertiesUtil.java b/solr/solrj/src/java/org/apache/solr/common/util/PropertiesUtil.java
index 3e00414408d..9ae768c1f0a 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/PropertiesUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/PropertiesUtil.java
@@ -105,7 +105,7 @@ public class PropertiesUtil {
fragments.add("$");
prev = pos + 1;
} else if (value.charAt(pos + 1) != '{') {
- // peek ahead to see if the next char is a property or not
+ // peek ahead to see if the next char is a property or
// not a property: insert the char as a literal
/*
fragments.addElement(value.substring(pos + 1, pos + 2));
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/StrUtils.java b/solr/solrj/src/java/org/apache/solr/common/util/StrUtils.java
index e2992204856..28723375fe5 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/StrUtils.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/StrUtils.java
@@ -74,7 +74,7 @@ public class StrUtils {
} else if (inString != 0 && ch == inString) {
inString = 0;
} else if (ch == '\'' || ch == '"') {
- // If char is directly preceeded by a number or letter
+ // If char is directly preceded by a number or letter
// then don't treat it as the start of a string.
// Examples: 50" TV, or can't
if (!Character.isLetterOrDigit(prevChar)) {
@@ -164,7 +164,7 @@ public class StrUtils {
* by backslash '\'
*
* @param fileNames the string containing file names
- * @return a list of file names with the escaping backslashed removed
+ * @return a list of file names with the escaping backslashes removed
*/
public static List<String> splitFileNames(String fileNames) {
if (fileNames == null) return Collections.<String>emptyList();
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/TimeSource.java b/solr/solrj/src/java/org/apache/solr/common/util/TimeSource.java
index 6365882c250..f5313288dc9 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/TimeSource.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/TimeSource.java
@@ -172,7 +172,8 @@ public abstract class TimeSource {
* Obtain an instance of time source.
*
* @param type supported types: <code>currentTime</code>, <code>nanoTime</code> and accelerated
- * time with a double factor in the form of <code>simTime:FACTOR</code>, eg. <code>simTime:2.5
+ * time with a double factor in the form of <code>simTime:FACTOR</code>, e.g. <code>
+ * simTime:2.5
* </code>
* @return one of the supported types
*/
@@ -228,7 +229,7 @@ public abstract class TimeSource {
public abstract long[] getTimeAndEpochNs();
/**
- * Sleep according to this source's notion of time. Eg. accelerated time source such as {@link
+ * Sleep according to this source's notion of time. E.g. accelerated time source such as {@link
* SimTimeSource} will sleep proportionally shorter, according to its multiplier.
*
* @param ms number of milliseconds to sleep
@@ -238,8 +239,8 @@ public abstract class TimeSource {
/**
* This method allows using TimeSource with APIs that require providing just plain time intervals,
- * eg. {@link Object#wait(long)}. Values returned by this method are adjusted according to the
- * time source's notion of time - eg. accelerated time source provided by {@link SimTimeSource}
+ * e.g. {@link Object#wait(long)}. Values returned by this method are adjusted according to the
+ * time source's notion of time - e.g. accelerated time source provided by {@link SimTimeSource}
* will return intervals that are proportionally shortened by the multiplier.
*
* <p>NOTE: converting small values may significantly affect precision of the returned values due
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java b/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java
index 78de07ba5b3..6ddd81052b7 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/URLUtil.java
@@ -67,7 +67,8 @@ public class URLUtil {
final var indexOfLastSlash = coreUrl.lastIndexOf("/");
if (indexOfLastSlash == -1) {
log.warn(
- "Solr core URL [{}] did not contain expected path segments when parsing, ignoring...");
+ "Solr core URL [{}] did not contain expected path segments when parsing, ignoring...",
+ coreUrl);
return coreUrl;
}
return coreUrl.substring(0, coreUrl.lastIndexOf("/"));
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
index 98899633bff..8a9aec1b80f 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
@@ -695,8 +695,8 @@ public class Utils {
}
/**
- * Applies one json over other. The 'input' is applied over the sink The values in input isapplied
- * over the values in 'sink' . If a value is 'null' that value is removed from sink
+ * Applies one json over another. The 'input' is applied over the sink The values in input is
+ * applied over the values in 'sink' . If a value is 'null' that value is removed from sink
*
* @param sink the original json object to start with. Ensure that this Map is mutable
* @param input the json with new values
diff --git a/solr/solrj/src/java/org/noggit/JSONParser.java b/solr/solrj/src/java/org/noggit/JSONParser.java
index 187dba3ee15..48ddc447f31 100644
--- a/solr/solrj/src/java/org/noggit/JSONParser.java
+++ b/solr/solrj/src/java/org/noggit/JSONParser.java
@@ -27,7 +27,7 @@ public class JSONParser {
/** Event indicating a JSON string value, including member names of objects */
public static final int STRING = 1;
- /** Event indicating a JSON number value which fits into a signed 64 bit integer */
+ /** Event indicating a JSON number value which fits into a signed 64-bit integer */
public static final int LONG = 2;
/**
@@ -39,7 +39,7 @@ public class JSONParser {
/**
* Event indicating a JSON number value that was not produced by toString of any Java primitive
- * numerics such as Double or Long. It is either an integer outside the range of a 64 bit signed
+ * numerics such as Double or Long. It is either an integer outside the range of a 64-bit signed
* integer, or a floating point value with a string representation of more than 23 chars.
*/
public static final int BIGNUMBER = 4;
@@ -75,8 +75,8 @@ public class JSONParser {
/**
* ALLOW_EXTRA_COMMAS causes any number of extra commas in arrays and objects to be ignored Note
- * that a trailing comma in [] would be [,] (hence calling the feature "trailing" commas is either
- * limiting or misleading. Since trailing commas is fundamentally incompatible with any future
+ * that a trailing comma in [] would be [,], hence calling the feature "trailing" commas is either
+ * limiting or misleading. Since trailing commas are fundamentally incompatible with any future
* "fill-in-missing-values-with-null", it was decided to extend this feature to handle any number
* of extra commas.
*/
@@ -276,7 +276,7 @@ public class JSONParser {
for (; ; ) {
int ch = getChar();
// getCharNWS is normally called in the context of expecting certain JSON special characters
- // such as ":}"]," all of these characters are below 64 (including comment chars '/' and '#',
+ // such as ":}"]," all of these characters are below 64, including comment chars '/' and '#',
// so we can make this the fast path even w/o checking the range first. We'll only get some
// false-positives while using bare strings (chars "IJMc")
if (((WS_MASK >> ch) & 0x01) == 0) {
@@ -321,7 +321,7 @@ public class JSONParser {
protected int getCharNWS(int ch) throws IOException {
for (; ; ) {
// getCharNWS is normally called in the context of expecting certain JSON special characters
- // such as ":}"]," all of these characters are below 64 (including comment chars '/' and '#',
+ // such as ":}"]," all of these characters are below 64, including comment chars '/' and '#',
// so we can make this the fast path even w/o checking the range first. We'll only get some
// false-positives while using bare strings (chars "IJMc")
if (((WS_MASK >> ch) & 0x01) == 0) {
@@ -480,7 +480,7 @@ public class JSONParser {
// the positive plane.
long v = (long) '0' - firstChar;
// can't overflow a long in 18 decimal digits (i.e. 17 additional after the first).
- // we also need 22 additional to handle double so we'll handle in 2 separate loops.
+ // we also need 22 additional to handle double, so we'll handle in 2 separate loops.
int i;
for (i = 0; i < 17; i++) {
int ch = getChar();
@@ -1197,7 +1197,7 @@ public class JSONParser {
/**
* Reads a number from the input stream and parses it as a long, only if the value will in fact
- * fit into a signed 64 bit integer.
+ * fit into a signed 64-bit integer.
*/
public long getLong() throws IOException {
goTo(LONG);
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/ApiMustacheTemplateTests.java b/solr/solrj/src/test/org/apache/solr/client/solrj/ApiMustacheTemplateTests.java
index 48111acf7d2..1dd0c524053 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/ApiMustacheTemplateTests.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/ApiMustacheTemplateTests.java
@@ -57,7 +57,7 @@ public class ApiMustacheTemplateTests {
Assert.assertNotSame(data.getClass(), response.getClass());
Assert.assertFalse(data instanceof JacksonParsingResponse<?>);
- // Currently all response types extend SolrJerseyResponse. Adjust if this change in the future.
+ // Currently, all response types extend SolrJerseyResponse. Adjust if this change in the future.
Assert.assertTrue(data instanceof SolrJerseyResponse);
}
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java
index 243e16da9fa..942b0dbea48 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java
@@ -208,7 +208,7 @@ public class CollectionAdminRequestRequiredParamsTest extends SolrTestCase {
public void testMigrate() {
final CollectionAdminRequest.Migrate request =
- CollectionAdminRequest.migrateData("collection", "targer", "splitKey");
+ CollectionAdminRequest.migrateData("collection", "target", "splitKey");
assertContainsParams(request.getParams(), ACTION, COLLECTION, "target.collection", "split.key");
}
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/LargeVolumeTestBase.java b/solr/solrj/src/test/org/apache/solr/client/solrj/LargeVolumeTestBase.java
index 77771c79e24..93db65f586b 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/LargeVolumeTestBase.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/LargeVolumeTestBase.java
@@ -55,7 +55,7 @@ public abstract class LargeVolumeTestBase extends EmbeddedSolrServerTestBase {
threads[i].join();
}
- // some of the commits could have failed because maxWarmingSearchers exceeded,
+ // some commits could have failed because maxWarmingSearchers exceeded,
// so do a final commit to make sure everything is visible.
// This should no longer be true as of SOLR-9712 (Solr 6.4)
// client.commit();
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleCborTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleCborTest.java
index dd1bbb0f0de..f0d420a69ec 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleCborTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleCborTest.java
@@ -56,7 +56,7 @@ public class SolrExampleCborTest extends SolrExampleTests {
.withDefaultCollection(DEFAULT_TEST_CORENAME)
.allowMultiPartPost(random().nextBoolean())
.withRequestWriter(cborRequestWriter())
- .withResponseParser(cborResponseparser())
+ .withResponseParser(cborResponseParser())
.build();
}
@@ -199,7 +199,7 @@ public class SolrExampleCborTest extends SolrExampleTests {
@Override
@Ignore
- public void testChildDoctransformer() {
+ public void testChildDocTransformer() {
/*Ignore*/
}
@@ -293,7 +293,7 @@ public class SolrExampleCborTest extends SolrExampleTests {
};
}
- private static ResponseParser cborResponseparser() {
+ private static ResponseParser cborResponseParser() {
return new ResponseParser() {
@Override
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
index bb5f97ac7ab..66154e7c6ec 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
@@ -2575,7 +2575,7 @@ public abstract class SolrExampleTests extends SolrExampleTestsBase {
}
@Test
- public void testChildDoctransformer() throws IOException, SolrServerException {
+ public void testChildDocTransformer() throws IOException, SolrServerException {
SolrClient client = getSolrClient();
client.deleteByQuery("*:*");
client.commit();
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTestsBase.java b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTestsBase.java
index 01b0940f357..4f0fc0ed374 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTestsBase.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTestsBase.java
@@ -164,7 +164,7 @@ public abstract class SolrExampleTestsBase extends SolrJettyTestBase {
rsp = client.query(new SolrQuery("id:id3"));
assertEquals(1, rsp.getResults().getNumFound());
- // now test commitWithin on a delete
+ // now test commitWithin on a delete operation
UpdateRequest up = new UpdateRequest();
up.setCommitWithin(1000);
up.deleteById("id3");
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java b/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java
index 5d8fafc7160..8d65a55ade1 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java
@@ -198,7 +198,7 @@ public class TestDocumentObjectBinder extends SolrTestCase {
inStock = b;
}
- // required if you want to fill SolrDocuments with the same annotaion...
+ // required if you want to fill SolrDocuments with the same annotation.
public boolean isInStock() {
return inStock;
}
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest.java
index de79f75a6a2..bf0e3ad00bf 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest.java
@@ -873,7 +873,7 @@ public class BasicHttpSolrClientTest extends SolrJettyTestBase {
setReqParamsOf(req4, "serverOnly", "requestOnly", "both", "neither");
expectThrows(BaseHttpSolrClient.RemoteSolrException.class, () -> client.request(req4));
// NOTE: single stream requests send all the params
- // as part of the query string. So add "neither" to the request
+ // as part of the query string. So add "neither" to the request,
// so it passes the verification step.
req4.setQueryParams(Set.of("requestOnly", "both", "neither"));
verifyServletState(client, req4);
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
index 2a0693c2360..adc259460c1 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
@@ -499,7 +499,7 @@ public class CloudHttp2SolrClientTest extends SolrCloudTestCase {
// For this case every shard should have
// all its cores on the same node.
- // Hence the below configuration for our collection
+ // Hence, the below configuration for our collection
CollectionAdminRequest.createCollection(collectionName, "conf", liveNodes, liveNodes)
.processAndWait(cluster.getSolrClient(), TIMEOUT);
cluster.waitForActiveCollection(collectionName, liveNodes, liveNodes * liveNodes);
@@ -1112,7 +1112,7 @@ public class CloudHttp2SolrClientTest extends SolrCloudTestCase {
int liveNodes = cluster.getJettySolrRunners().size();
// For these tests we need to have multiple replica types.
- // Hence the below configuration for our collection
+ // Hence, the below configuration for our collection
int pullReplicas = Math.max(1, liveNodes - 2);
CollectionAdminRequest.createCollection(collectionName, "conf", liveNodes, 1, 1, pullReplicas)
.processAndWait(cluster.getSolrClient(), TIMEOUT);
@@ -1173,7 +1173,7 @@ public class CloudHttp2SolrClientTest extends SolrCloudTestCase {
for (Replica replica : slice.getReplicas()) {
String coreUrl = replica.getCoreUrl();
// It seems replica reports its core URL with a trailing slash while shard
- // info returned from the query doesn't. Oh well.
+ // info returned from the query doesn't.
if (coreUrl.endsWith("/")) {
coreUrl = coreUrl.substring(0, coreUrl.length() - 1);
}
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientRoutingTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientRoutingTest.java
index 6b805a53d83..f2824b9e550 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientRoutingTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientRoutingTest.java
@@ -99,7 +99,7 @@ public final class CloudSolrClientRoutingTest extends SolrCloudTestCase {
// at the mercy of org.apache.solr.servlet.HttpSolrCall.randomlyGetSolrCore, and if this
// randomly selected replica is not the one the doc id lives in, the request is forwarded
// from there.
- // The decision whether or not the request is forwarded is made at
+ // The decision whether the request is forwarded is made at
// org.apache.solr.handler.component.HttpShardHandler.canShortCircuit()
boolean forwardedWithoutRoute =
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
index e40e126254c..ad718210e91 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
@@ -435,7 +435,7 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
int liveNodes = cluster.getJettySolrRunners().size();
// For this case every shard should have all its cores on the same node.
- // Hence the below configuration for our collection
+ // Hence, the below configuration for our collection
CollectionAdminRequest.createCollection(collectionName, "conf", liveNodes, liveNodes)
.processAndWait(cluster.getSolrClient(), TIMEOUT);
cluster.waitForActiveCollection(collectionName, liveNodes, liveNodes * liveNodes);
@@ -1052,7 +1052,7 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
int liveNodes = cluster.getJettySolrRunners().size();
// For these tests we need to have multiple replica types.
- // Hence the below configuration for our collection
+ // Hence, the below configuration for our collection
int pullReplicas = Math.max(1, liveNodes - 2);
CollectionAdminRequest.createCollection(collectionName, "conf", liveNodes, 1, 1, pullReplicas)
.processAndWait(cluster.getSolrClient(), TIMEOUT);
@@ -1112,7 +1112,7 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
for (Replica replica : slice.getReplicas()) {
String coreUrl = replica.getCoreUrl();
// It seems replica reports its core URL with a trailing slash while shard
- // info returned from the query doesn't. Oh well.
+ // info returned from the query doesn't.
if (coreUrl.endsWith("/")) {
coreUrl = coreUrl.substring(0, coreUrl.length() - 1);
}
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java
index d2c5686d6bb..111b306e21e 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java
@@ -71,7 +71,7 @@ public class ConcurrentUpdateSolrClientBuilderTest extends SolrTestCase {
if (!(e.getCause() instanceof SocketTimeoutException)) {
throw e;
}
- // else test passses
+ // else test passes
}
}
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientCompatibilityTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientCompatibilityTest.java
index 835f4c04cbe..65c240a8e5f 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientCompatibilityTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientCompatibilityTest.java
@@ -86,7 +86,8 @@ public class Http2SolrClientCompatibilityTest extends SolrJettyTestBase {
}
public void testConnectToOldNodesUsingHttp2() throws Exception {
- // if this test some how failure, this mean that Jetty client now be able to switch between
+ // if this test somehow fails, this means that the Jetty client may now be able to switch
+ // between
// HTTP/1 and HTTP/2.2 protocol dynamically therefore rolling updates will be easier we should
// then notify this to users
JettyConfig jettyConfig =
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientProxyTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientProxyTest.java
index 6b48b1777da..99ea3af66c1 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientProxyTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientProxyTest.java
@@ -87,7 +87,7 @@ public class Http2SolrClientProxyTest extends SolrTestCaseJ4 {
try (HttpJdkSolrClient client = builder.build()) {
testProxy(client);
}
- // This is a workaround for java.net.http.HttpClient not implementing closeable/autoclosable
+ // This is a workaround for java.net.http.HttpClient not implementing closeable/autocloseable
// until Java 21.
Thread[] threads = new Thread[Thread.currentThread().getThreadGroup().activeCount()];
Thread.currentThread().getThreadGroup().enumerate(threads);
@@ -102,7 +102,7 @@ public class Http2SolrClientProxyTest extends SolrTestCaseJ4 {
System.gc();
}
- /** Setup a simple http proxy and verify a request works */
+ /** Set up a simple http proxy and verify a request works */
public void testProxy(HttpSolrClientBase client) throws Exception {
String id = "1234";
SolrInputDocument doc = new SolrInputDocument();
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientTestBase.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientTestBase.java
index ec14e871e67..d9f3a5544b4 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientTestBase.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientTestBase.java
@@ -442,7 +442,7 @@ public abstract class HttpSolrClientTestBase extends SolrJettyTestBase {
} catch (BaseHttpSolrClient.RemoteSolrException ignored) {
}
// NOTE: single stream requests send all the params
- // as part of the query string. So add "neither" to the request
+ // as part of the query string. So add "neither" to the request,
// so it passes the verification step.
req.setQueryParams(Set.of("requestOnly", "both", "neither"));
verifyServletState(client, req);
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttp2SolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttp2SolrClientTest.java
index 367184ed2d4..5f55b353c0d 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttp2SolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttp2SolrClientTest.java
@@ -82,7 +82,7 @@ public class LBHttp2SolrClientTest extends SolrTestCase {
LBHttp2SolrClient testClient = new LBHttp2SolrClient.Builder(client, ep1, ep2).build()) {
for (int j = 0; j < 2; j++) {
- // j: first time Endpoint One will retrun error code 500.
+ // first time Endpoint One will return error code 500.
// second time Endpoint One will be healthy
String basePathToSucceed;
@@ -185,7 +185,7 @@ public class LBHttp2SolrClientTest extends SolrTestCase {
}
// It is the user's responsibility to shuffle the endpoints when using
- // async. LB Http Solr Client always will try the passed-in endpoints
+ // async. LB Http Solr Client will always try the passed-in endpoints
// in order. In this case, endpoint 1 gets all the requests!
assertEquals(limit, numEndpointOne);
assertEquals(0, numEndpointTwo);
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/SendUpdatesToLeadersOverrideTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/SendUpdatesToLeadersOverrideTest.java
index ac70668c09e..7c716070b1d 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/SendUpdatesToLeadersOverrideTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/SendUpdatesToLeadersOverrideTest.java
@@ -54,7 +54,8 @@ import org.slf4j.LoggerFactory;
* after the <code>distrib</code> processor) to inspect which replicas receive various {@link
* UpdateRequest}s from variously configured {@link CloudSolrClient}s. In some requests, <code>
* shards.preference=replica.type:PULL</code> is specified to confirm that typical routing
- * prefrences are respected (when the effective value of <code>isSendToLeaders</code> is <code>false
+ * preferences are respected (when the effective value of <code>isSendToLeaders</code> is <code>
+ * false
* </code>)
*/
public class SendUpdatesToLeadersOverrideTest extends SolrCloudTestCase {
@@ -134,7 +135,7 @@ public class SendUpdatesToLeadersOverrideTest extends SolrCloudTestCase {
.collect(Collectors.toUnmodifiableList());
}
- /** Convinience class for making assertions about the updates that were processed */
+ /** Convenience class for making assertions about the updates that were processed */
private static class RecordingResults {
public final List<UpdateCommand> preDistribCommands;
public final List<UpdateCommand> postDistribCommands;
@@ -271,7 +272,7 @@ public class SendUpdatesToLeadersOverrideTest extends SolrCloudTestCase {
}
/**
- * Given a SolrClient, sends various updates and asserts expecations regarding default behavior:
+ * Given a SolrClient, sends various updates and asserts expectations regarding default behavior:
* that these requests will be initially sent to shard leaders, and "routed" requests will be sent
* to the leader for that route's shard
*/
@@ -300,7 +301,7 @@ public class SendUpdatesToLeadersOverrideTest extends SolrCloudTestCase {
"add pre and post should be exact same reqs",
add.preDistribRequests.keySet(),
add.postDistribRequests.keySet());
- // NOTE: we can't assert the pre/post commands are the same, because they add versioning
+ // NOTE: we can't assert the pre- / post-commands are the same, because they add versioning
// whatever leader our add was routed to, a DBI for the same id should go to the same leader
final RecordingResults del =
@@ -366,7 +367,7 @@ public class SendUpdatesToLeadersOverrideTest extends SolrCloudTestCase {
record.preDistribCores.keySet(),
record.postDistribCores.keySet());
- // NOTE: we make no asertion about number of post-distrb requests, just commands
+ // NOTE: we make no assertion about number of post-distrib requests, just commands
// (distrib proc may batch differently then what we send)
assertEquals(
"multi post-distrib cores don't match pre-distrib cores",
@@ -377,8 +378,8 @@ public class SendUpdatesToLeadersOverrideTest extends SolrCloudTestCase {
}
/**
- * Given a SolrClient, sends various updates using {@link #prefPull} and asserts expecations that
- * these requests will be initially sent to PULL replcias
+ * Given a SolrClient, sends various updates using {@link #prefPull} and asserts expectations that
+ * these requests will be initially sent to PULL replicas
*/
private void checkUpdatesWithShardsPrefPull(final CloudSolrClient client) throws Exception {
@@ -474,7 +475,7 @@ public class SendUpdatesToLeadersOverrideTest extends SolrCloudTestCase {
record.postDistribCores.keySet());
// NOTE: Don't assume our docIds are spread across multi-shards...
//
- // We make no asertion about number of post-distrb requests
+ // We make no asertion about number of post-distrib requests
// (distrib proc may batch differently then what we send)
assertThat(
"multi post-distrib cores",
@@ -486,7 +487,7 @@ public class SendUpdatesToLeadersOverrideTest extends SolrCloudTestCase {
/**
* Given a SolrClient, sends various updates were {@link IsUpdateRequest#isSendToLeaders} returns
- * false, and asserts expectations that requess using {@link #prefPull} are all sent to PULL
+ * false, and asserts expectations that requests using {@link #prefPull} are all sent to PULL
* replicas, regardless of how the client is configured.
*/
private void checkUpdatesWithSendToLeadersFalse(final CloudSolrClient client) throws Exception {
@@ -583,7 +584,7 @@ public class SendUpdatesToLeadersOverrideTest extends SolrCloudTestCase {
record.postDistribCores.keySet());
// NOTE: Don't assume our docIds are spread across multi-shards...
//
- // We make no asertion about number of post-distrb requests
+ // We make no assertion about number of post-distrib requests
// (distrib proc may batch differently then what we send)
assertThat(
"multi post-distrib cores",
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCoreAdmin.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCoreAdmin.java
index 063b538b743..d8630d016ff 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCoreAdmin.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCoreAdmin.java
@@ -95,8 +95,8 @@ public class TestCoreAdmin extends AbstractEmbeddedSolrServerTestCase {
req.setIsTransient(true);
req.process(client);
- // Show that the newly-created core has values for load on startup and transient different
- // than defaults due to the above.
+ // Show that the newly-created core has values for load on startup and transient that differ
+ // from defaults due to the above.
File logDir;
try (SolrCore coreProveIt = cores.getCore("collection1");
SolrCore core = cores.getCore("newcore")) {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java
index 9fa69a52281..e8c72a52b44 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java
@@ -111,7 +111,7 @@ public class TestUpdateRequestCodec extends SolrTestCase {
}
@Test
- public void testIteratable() throws IOException {
+ public void testIterable() throws IOException {
final List<String> values = new ArrayList<>();
values.add("iterItem1");
values.add("iterItem2");
@@ -122,7 +122,7 @@ public class TestUpdateRequestCodec extends SolrTestCase {
SolrInputDocument doc = new SolrInputDocument();
doc.addField("id", 1);
doc.addField("desc", "one");
- // imagine someone adding a custom Bean that implements Iterable
+ // imagine someone adds a custom Bean that implements Iterable
// but is not a Collection
doc.addField("iter", (Iterable<String>) values::iterator);
doc.addField("desc", "1");
@@ -284,7 +284,7 @@ public class TestUpdateRequestCodec extends SolrTestCase {
Object expectedVal = expectedField.getValue();
Object actualVal = actualField.getValue();
if (expectedVal instanceof Set && actualVal instanceof Collection) {
- // unmarshaled documents never contain Sets, they are just a
+ // unmarshalled documents never contain Sets, they are just a
// List in an arbitrary order based on what the iterator of
// the original Set returned, so we need a comparison that is
// order agnostic.
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/response/AnalysisResponseBaseTest.java
similarity index 97%
rename from solr/solrj/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java
rename to solr/solrj/src/test/org/apache/solr/client/solrj/response/AnalysisResponseBaseTest.java
index 35e8f88893b..d56a8d58839 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/response/AnalysisResponseBaseTest.java
@@ -27,7 +27,7 @@ import org.junit.Test;
*
* @since solr 1.4
*/
-public class AnlysisResponseBaseTest extends SolrTestCase {
+public class AnalysisResponseBaseTest extends SolrTestCase {
/**
* Tests the {@link AnalysisResponseBase#buildTokenInfo(org.apache.solr.common.util.NamedList)}
@@ -68,7 +68,7 @@ public class AnlysisResponseBaseTest extends SolrTestCase {
}
/**
- * Tests the {@link AnalysisResponseBase#buildPhases(org.apache.solr.common.util.NamedList)} )}
+ * Tests the {@link AnalysisResponseBase#buildPhases(org.apache.solr.common.util.NamedList)}
* method.
*/
@Test
@@ -100,7 +100,7 @@ public class AnlysisResponseBaseTest extends SolrTestCase {
}
/**
- * Tests the {@link AnalysisResponseBase#buildPhases(org.apache.solr.common.util.NamedList)} )}
+ * Tests the {@link AnalysisResponseBase#buildPhases(org.apache.solr.common.util.NamedList)}
* method for the special case of CharacterFilter.
*/
@Test
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java b/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java
index 319905717e1..2f9487a6a3b 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java
@@ -109,7 +109,7 @@ public class TestSpellCheckResponse extends EmbeddedSolrServerTestBase {
assertTrue(sug.getNumFound() > 0);
// assertTrue(sug.getOriginalFrequency() > 0);
- // Hmmm... the API for SpellCheckResponse could be nicer:
+ // Hmm... the API for SpellCheckResponse could be nicer:
response.getSuggestions().get(0).getAlternatives().get(0);
}
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparatorTest.java
index 1fa85e4981f..17d918a233a 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/NodePreferenceRulesComparatorTest.java
@@ -123,7 +123,7 @@ public class NodePreferenceRulesComparatorTest extends SolrTestCaseJ4 {
"NRT"),
"collection1",
"shard1"));
- // Prefer non-leader only, therefore node1 has lowest priority
+ // Prefer non-leader only, therefore node1 has the lowest priority
List<PreferenceRule> rules =
PreferenceRule.from(ShardParams.SHARDS_PREFERENCE_REPLICA_LEADER + ":false");
NodePreferenceRulesComparator comparator = new NodePreferenceRulesComparator(rules, null);
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java
index aa3e86bb8d7..11d1893ae8f 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/routing/ReplicaListTransformerTest.java
@@ -76,11 +76,11 @@ public class ReplicaListTransformerTest extends SolrTestCase {
final ReplicaListTransformer transformer;
if (random().nextBoolean()) {
- log.info("Using ToyMatching Transfomer");
+ log.info("Using ToyMatching Transformer");
transformer = new ToyMatchingReplicaListTransformer(regex);
} else {
- log.info("Using conditional Transfomer");
+ log.info("Using conditional Transformer");
transformer =
new HttpShardHandlerFactory() {
diff --git a/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java b/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java
index 070f8c88c51..13532e8ef5e 100644
--- a/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java
+++ b/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java
@@ -121,7 +121,7 @@ public class TestCollectionStateWatchers extends SolrCloudTestCase {
CloudSolrClient client = cluster.getSolrClient();
- // note: one node in our cluster is unsed by collection
+ // note: one node in our cluster is unused by collection
CollectionAdminRequest.createCollection("testcollection", "config", CLUSTER_SIZE, 1)
.processAndWait(client, MAX_WAIT_TIMEOUT);
@@ -249,7 +249,7 @@ public class TestCollectionStateWatchers extends SolrCloudTestCase {
@Test
@Ignore
- public void testCanWaitForNonexistantCollection() throws Exception {
+ public void testCanWaitForNonexistentCollection() throws Exception {
Future<Boolean> future =
waitInBackground(
diff --git a/solr/solrj/src/test/org/apache/solr/common/cloud/TestDocCollectionWatcher.java b/solr/solrj/src/test/org/apache/solr/common/cloud/TestDocCollectionWatcher.java
index 03b4959df93..4cc96202254 100644
--- a/solr/solrj/src/test/org/apache/solr/common/cloud/TestDocCollectionWatcher.java
+++ b/solr/solrj/src/test/org/apache/solr/common/cloud/TestDocCollectionWatcher.java
@@ -180,7 +180,7 @@ public class TestDocCollectionWatcher extends SolrCloudTestCase {
}
@Test
- public void testCanWaitForNonexistantCollection() throws Exception {
+ public void testCanWaitForNonexistentCollection() throws Exception {
Future<Boolean> future =
waitInBackground("delayed", MAX_WAIT_TIMEOUT, TimeUnit.SECONDS, Objects::nonNull);
diff --git a/solr/solrj/src/test/org/apache/solr/common/params/SolrParamTest.java b/solr/solrj/src/test/org/apache/solr/common/params/SolrParamTest.java
index 84b8ea1894c..bd732879289 100644
--- a/solr/solrj/src/test/org/apache/solr/common/params/SolrParamTest.java
+++ b/solr/solrj/src/test/org/apache/solr/common/params/SolrParamTest.java
@@ -272,7 +272,7 @@ public class SolrParamTest extends SolrTestCase {
assertEquals(400, getReturnCode(() -> params.getBool("f.bad.bool")));
assertEquals(400, getReturnCode(() -> params.getFloat("f.bad.float")));
- // Ask for params that arent there
+ // Ask for params that aren't there
assertNull(params.get("asagdsaga"));
assertNull(params.getBool("asagdsaga"));
assertNull(params.getInt("asagdsaga"));
diff --git a/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java b/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
index cc4fd1b156c..019e00d675f 100644
--- a/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
+++ b/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
@@ -147,7 +147,7 @@ public class ContentStreamTest extends SolrTestCaseJ4 {
}
}
- public void testURLStreamCSVGZIPExtention() throws IOException {
+ public void testURLStreamCSVGZIPExtension() throws IOException {
File file = new File(createTempDir().toFile(), "README.CSV.gz");
try (SolrResourceLoader srl = new SolrResourceLoader(Paths.get("").toAbsolutePath());
@@ -173,7 +173,7 @@ public class ContentStreamTest extends SolrTestCaseJ4 {
}
}
- public void testURLStreamJSONGZIPExtention() throws IOException {
+ public void testURLStreamJSONGZIPExtension() throws IOException {
File file = new File(createTempDir().toFile(), "README.json.gzip");
try (SolrResourceLoader srl = new SolrResourceLoader(Paths.get("").toAbsolutePath());
diff --git a/solr/solrj/src/test/org/apache/solr/common/util/ExecutorUtilTest.java b/solr/solrj/src/test/org/apache/solr/common/util/ExecutorUtilTest.java
index f797ef547a3..f9d6026edd0 100644
--- a/solr/solrj/src/test/org/apache/solr/common/util/ExecutorUtilTest.java
+++ b/solr/solrj/src/test/org/apache/solr/common/util/ExecutorUtilTest.java
@@ -41,9 +41,9 @@ public class ExecutorUtilTest extends SolrTestCase {
/**
* The maximum amount of time we're willing to let the test wait for any type of blocking action,
- * no matter ow slow our CPU is. Any thing that exceeds this time is presumably a bug
+ * no matter ow slow our CPU is. Anything that exceeds this time is presumably a bug
*/
- private static final long MAX_SANE_WAIT_DURRATION_MS = 2_000;
+ private static final long MAX_SANE_WAIT_DURATION_MS = 2_000;
/** Test that if there is a non interruptable thread that awaitTermination eventually returns. */
@Test
@@ -74,7 +74,7 @@ public class ExecutorUtilTest extends SolrTestCase {
// Worker should finish if we let it
w.tellWorkerToFinish();
- assertTrue(f.get(MAX_SANE_WAIT_DURRATION_MS, TimeUnit.MILLISECONDS));
+ assertTrue(f.get(MAX_SANE_WAIT_DURATION_MS, TimeUnit.MILLISECONDS));
} finally {
w.tellWorkerToFinish();
ExecutorUtil.shutdownNowAndAwaitTermination(executorService);
@@ -99,10 +99,10 @@ public class ExecutorUtilTest extends SolrTestCase {
ExecutorUtil.awaitTermination(
executorService, MAX_AWAIT_TERMINATION_ARG_MS, TimeUnit.MILLISECONDS);
- // Worker should finish on it's own after the interupt
+ // Worker should finish on its own after the interupt
assertTrue(
"Worker not interupted in a sane amount of time", w.awaitWorkerInteruptedAtLeastOnce());
- assertFalse(f.get(MAX_SANE_WAIT_DURRATION_MS, TimeUnit.MILLISECONDS));
+ assertFalse(f.get(MAX_SANE_WAIT_DURATION_MS, TimeUnit.MILLISECONDS));
assertTrue("test sanity check: WTF? how did we get here?", w.getNumberOfInterupts() > 0);
} finally {
@@ -163,7 +163,7 @@ public class ExecutorUtilTest extends SolrTestCase {
}
private static final class Worker implements Callable<Boolean> {
- // how we communiate out to our caller
+ // how we communicate out to our caller
private final CountDownLatch taskStartedLatch = new CountDownLatch(1);
private final CountDownLatch gotFirstInteruptLatch = new CountDownLatch(1);
private final AtomicInteger interruptCount = new AtomicInteger(0);
@@ -178,12 +178,12 @@ public class ExecutorUtilTest extends SolrTestCase {
/** Returns false if worker doesn't start in a sane amount of time */
public boolean awaitWorkerStart() throws InterruptedException {
- return taskStartedLatch.await(MAX_SANE_WAIT_DURRATION_MS, TimeUnit.MILLISECONDS);
+ return taskStartedLatch.await(MAX_SANE_WAIT_DURATION_MS, TimeUnit.MILLISECONDS);
}
- /** Returns false if worker didn't recieve interupt in a sane amount of time */
+ /** Returns false if worker didn't receive interupt in a sane amount of time */
public boolean awaitWorkerInteruptedAtLeastOnce() throws InterruptedException {
- return gotFirstInteruptLatch.await(MAX_SANE_WAIT_DURRATION_MS, TimeUnit.MILLISECONDS);
+ return gotFirstInteruptLatch.await(MAX_SANE_WAIT_DURATION_MS, TimeUnit.MILLISECONDS);
}
public int getNumberOfInterupts() {
@@ -196,15 +196,15 @@ public class ExecutorUtilTest extends SolrTestCase {
@Override
public Boolean call() {
- // aboslute last resort timeout to prevent infinite while loop
+ // absolute last resort timeout to prevent infinite while loop
final TimeOut threadTimeout =
- new TimeOut(MAX_SANE_WAIT_DURRATION_MS, TimeUnit.MILLISECONDS, TimeSource.NANO_TIME);
+ new TimeOut(MAX_SANE_WAIT_DURATION_MS, TimeUnit.MILLISECONDS, TimeSource.NANO_TIME);
while (!threadTimeout.hasTimedOut()) {
try {
// this must be inside the try block, so we'll still catch the InterruptedException if our
- // caller shutsdown & awaits termination before we get a chance to start await'ing...
+ // caller shuts down & awaits termination before we get a chance to start awaiting...
taskStartedLatch.countDown();
if (allowedToFinishLatch.await(
diff --git a/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java b/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java
index d3937a28f9c..d70257decca 100644
--- a/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java
+++ b/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java
@@ -71,7 +71,7 @@ public class TestFastInputStream extends SolrTestCase {
}
}
- // code copied rfrom NamedlistCode#writechars
+ // code copied from NamedlistCode#writechars
public static void writeChars(OutputStream os, String s, int start, int length)
throws IOException {
final int end = start + length;
diff --git a/solr/solrj/src/test/org/apache/solr/common/util/TestJavaBinCodec.java b/solr/solrj/src/test/org/apache/solr/common/util/TestJavaBinCodec.java
index c10afef30fa..baf36a1cc89 100644
--- a/solr/solrj/src/test/org/apache/solr/common/util/TestJavaBinCodec.java
+++ b/solr/solrj/src/test/org/apache/solr/common/util/TestJavaBinCodec.java
@@ -197,36 +197,36 @@ public class TestJavaBinCodec extends SolrTestCaseJ4 {
}
}; ) {
@SuppressWarnings({"unchecked"})
- List<Object> unmarshaledObj = (List<Object>) javabin.unmarshal(is);
+ List<Object> unmarshalledObj = (List<Object>) javabin.unmarshal(is);
List<Object> matchObj = generateAllDataTypes();
- compareObjects(unmarshaledObj, matchObj);
+ compareObjects(unmarshalledObj, matchObj);
} catch (IOException e) {
throw e;
}
}
- private void compareObjects(List<?> unmarshaledObj, List<?> matchObj) {
- assertEquals(unmarshaledObj.size(), matchObj.size());
- for (int i = 0; i < unmarshaledObj.size(); i++) {
+ private void compareObjects(List<?> unmarshalledObj, List<?> matchObj) {
+ assertEquals(unmarshalledObj.size(), matchObj.size());
+ for (int i = 0; i < unmarshalledObj.size(); i++) {
- if (unmarshaledObj.get(i) instanceof byte[] && matchObj.get(i) instanceof byte[]) {
- byte[] b1 = (byte[]) unmarshaledObj.get(i);
+ if (unmarshalledObj.get(i) instanceof byte[] && matchObj.get(i) instanceof byte[]) {
+ byte[] b1 = (byte[]) unmarshalledObj.get(i);
byte[] b2 = (byte[]) matchObj.get(i);
assertArrayEquals(b1, b2);
- } else if (unmarshaledObj.get(i) instanceof SolrDocument
+ } else if (unmarshalledObj.get(i) instanceof SolrDocument
&& matchObj.get(i) instanceof SolrDocument) {
- assertTrue(compareSolrDocument(unmarshaledObj.get(i), matchObj.get(i)));
- } else if (unmarshaledObj.get(i) instanceof SolrDocumentList
+ assertTrue(compareSolrDocument(unmarshalledObj.get(i), matchObj.get(i)));
+ } else if (unmarshalledObj.get(i) instanceof SolrDocumentList
&& matchObj.get(i) instanceof SolrDocumentList) {
- assertTrue(compareSolrDocumentList(unmarshaledObj.get(i), matchObj.get(i)));
- } else if (unmarshaledObj.get(i) instanceof SolrInputDocument
+ assertTrue(compareSolrDocumentList(unmarshalledObj.get(i), matchObj.get(i)));
+ } else if (unmarshalledObj.get(i) instanceof SolrInputDocument
&& matchObj.get(i) instanceof SolrInputDocument) {
- assertTrue(compareSolrInputDocument(unmarshaledObj.get(i), matchObj.get(i)));
- } else if (unmarshaledObj.get(i) instanceof SolrInputField
+ assertTrue(compareSolrInputDocument(unmarshalledObj.get(i), matchObj.get(i)));
+ } else if (unmarshalledObj.get(i) instanceof SolrInputField
&& matchObj.get(i) instanceof SolrInputField) {
- assertTrue(assertSolrInputFieldEquals(unmarshaledObj.get(i), matchObj.get(i)));
+ assertTrue(assertSolrInputFieldEquals(unmarshalledObj.get(i), matchObj.get(i)));
} else {
- assertEquals(unmarshaledObj.get(i), matchObj.get(i));
+ assertEquals(unmarshalledObj.get(i), matchObj.get(i));
}
}
}
@@ -336,7 +336,7 @@ public class TestJavaBinCodec extends SolrTestCaseJ4 {
// but keeping this in code to make a point, that even the same exact bin file, there could be
// sub-objects in the key or value of the maps, with types that do not implement equals and in
// these cases equals would fail as these sub-objects would be equated on their
- // memory-references which is highly probbale to be unique and hence the top-level map's equals
+ // memory-references which is highly probable to be unique and hence the top-level map's equals
// will also fail assertNotEquals("2 different references even though from same source are
// un-equal",entryFromBinFileA,entryFromBinFileA_clone);
diff --git a/solr/solrj/src/test/org/apache/solr/common/util/TestXMLEscaping.java b/solr/solrj/src/test/org/apache/solr/common/util/TestXMLEscaping.java
index ff4022d8192..b861ab825af 100644
--- a/solr/solrj/src/test/org/apache/solr/common/util/TestXMLEscaping.java
+++ b/solr/solrj/src/test/org/apache/solr/common/util/TestXMLEscaping.java
@@ -20,7 +20,7 @@ import java.io.IOException;
import java.io.StringWriter;
import org.apache.solr.SolrTestCase;
-/** Test (some of the) character escaping functions of the XML class */
+/** Test some character escaping functions of the XML class */
public class TestXMLEscaping extends SolrTestCase {
private void doSimpleTest(String input, String expectedOutput) throws IOException {
final StringWriter sw = new StringWriter();