Skip to content

Commit

Permalink
Make TimeExceededException members final (#12271)
Browse files Browse the repository at this point in the history
TimeExceededException has three members that are set within its constructor and never modified. They can be made final.
  • Loading branch information
javanna committed May 9, 2023
1 parent 48986d1 commit 447cfea
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 447cfea

Please sign in to comment.