Make TimeExceededException members final (#12271)

TimeExceededException has three members that are set within its constructor and never modified. They can be made final.
This commit is contained in:
Luca Cavanna 2023-05-09 11:28:23 +02:00 committed by GitHub
parent 082c49a9ef
commit b6100d9787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -33,9 +33,9 @@ public class TimeLimitingCollector implements Collector {
/** Thrown when elapsed search time exceeds allowed search time. */
@SuppressWarnings("serial")
public static class TimeExceededException extends RuntimeException {
private long timeAllowed;
private long timeElapsed;
private int lastDocCollected;
private final long timeAllowed;
private final long timeElapsed;
private final int lastDocCollected;
private TimeExceededException(long timeAllowed, long timeElapsed, int lastDocCollected) {
super(