mirror of https://github.com/jwtk/jjwt.git
tightened up return on KeyAlgorithmsBridge.EstimateIterationsResult
This commit is contained in:
parent
588c7919ff
commit
09a19d3597
|
@ -231,8 +231,9 @@ public final class KeyAlgorithmsBridge {
|
||||||
}
|
}
|
||||||
double average = sumX / points.size();
|
double average = sumX / points.size();
|
||||||
//ensure our average is at least as much as the smallest work factor that got us closest to desiredMillis:
|
//ensure our average is at least as much as the smallest work factor that got us closest to desiredMillis:
|
||||||
estimateIterationsResultBuilder.setEstimatedIterations((int) Math.max(average, minWorkFactor));
|
return estimateIterationsResultBuilder
|
||||||
return estimateIterationsResultBuilder.build();
|
.setEstimatedIterations((int) Math.max(average, minWorkFactor))
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class Point {
|
private static class Point {
|
||||||
|
|
Loading…
Reference in New Issue