diff --git a/src/main/java/jenkins/advancedqueue/PriorityCalculationsUtil.java b/src/main/java/jenkins/advancedqueue/PriorityCalculationsUtil.java index 3ffecf2e..8af95921 100644 --- a/src/main/java/jenkins/advancedqueue/PriorityCalculationsUtil.java +++ b/src/main/java/jenkins/advancedqueue/PriorityCalculationsUtil.java @@ -13,8 +13,9 @@ public static int scale(int oldmax, int newmax, int value) { return PRIORITY_USE_DEFAULT_PRIORITY; } float p = ((float) (value - 1) / (float) (oldmax - 1)); - float eps = (float)0.0001; - if(p*(newmax - 1) > Math.round(p*(newmax - 1)) - eps && p*(newmax - 1) < Math.round(p*(newmax - 1)) + eps){ + float eps = (float) 0.0001; + if (p * (newmax - 1) > Math.round(p * (newmax - 1)) - eps + && p * (newmax - 1) < Math.round(p * (newmax - 1)) + eps) { return (int) (Math.round(p * (newmax - 1))) + 1; } if (p <= 0.5) {