Skip to content

Commit

Permalink
Avoid using raw type on AsyncListener
Browse files Browse the repository at this point in the history
./gradlew tidy
  • Loading branch information
patsonluk committed Nov 24, 2023
1 parent 19d455b commit 1d520fb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class FacetBucket {

@SuppressWarnings({"rawtypes"})
final Comparable bucketValue;

// this is just for internal correlation (the first bucket created is bucket 0, the next bucket 1,
// across all field buckets)
// bucketNumber is only supplied for buckets that could be part of a refinement chain, otherwise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ public List<CircuitBreaker> checkTripped(SolrRequestType requestType) {
if (circuitBreaker.isDebugMode()) {
if (log.isInfoEnabled()) {
log.info(
"Circuit breaker {} has tripped: {}",
circuitBreaker.getClass().getSimpleName(),
circuitBreaker.getErrorMessage());
"Circuit breaker {} has tripped: {}",
circuitBreaker.getClass().getSimpleName(),
circuitBreaker.getErrorMessage());
}
} else {
if (triggeredCircuitBreakers == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.SolrNamedThreadFactory;
import org.apache.solr.core.PluginInfo;
import org.apache.solr.core.SolrCore;
import org.apache.solr.util.circuitbreaker.CPUCircuitBreaker;
import org.apache.solr.util.circuitbreaker.CircuitBreaker;
Expand Down Expand Up @@ -257,7 +256,7 @@ public void testCircuitBreakerDebug() {
circuitBreaker.setDebugMode(true);
circuitBreaker.setThreshold(75);

assertThatHighQueryLoadTrips(circuitBreaker, 0); //should not trip
assertThatHighQueryLoadTrips(circuitBreaker, 0); // should not trip
}

private static void removeAllExistingCircuitBreakers() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,11 @@ static String basicAuthCredentialsToAuthorizationString(String user, String pass
return "Basic " + Base64.getEncoder().encodeToString(userPass.getBytes(FALLBACK_CHARSET));
}

private void decorateRequest(Request req, SolrRequest<?> solrRequest, boolean isAsync, AsyncListener asyncListener) {
private void decorateRequest(
Request req,
SolrRequest<?> solrRequest,
boolean isAsync,
AsyncListener<NamedList<Object>> asyncListener) {
req.headers(headers -> headers.remove(HttpHeader.ACCEPT_ENCODING));

if (requestTimeoutMillis > 0) {
Expand Down Expand Up @@ -668,14 +672,18 @@ private String getRequestPath(SolrRequest<?> solrRequest, String collection)
return basePath + path;
}


private Request makeRequestAndSend(
SolrRequest<?> solrRequest, String url, InputStreamResponseListener listener, boolean isAsync)
throws IOException, SolrServerException {
SolrRequest<?> solrRequest, String url, InputStreamResponseListener listener, boolean isAsync)
throws IOException, SolrServerException {
return makeRequestAndSend(solrRequest, url, listener, isAsync, null);
}

private Request makeRequestAndSend(
SolrRequest<?> solrRequest, String url, InputStreamResponseListener listener, boolean isAsync, AsyncListener<NamedList<Object>> asyncListener)
SolrRequest<?> solrRequest,
String url,
InputStreamResponseListener listener,
boolean isAsync,
AsyncListener<NamedList<Object>> asyncListener)
throws IOException, SolrServerException {

// TODO add invariantParams support
Expand Down

0 comments on commit 1d520fb

Please sign in to comment.