summaryrefslogtreecommitdiffstats
path: root/vdslib/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-08-03 10:59:22 +0200
committerGitHub <noreply@github.com>2019-08-03 10:59:22 +0200
commitf230096ade05c1f494371c5bca0f0996976f2fa7 (patch)
tree52aa2e026e2c5502a3104f75882608781e7cbd0e /vdslib/src
parentf19b0d9b4a373a91580a9e0c1be40840bdf4da10 (diff)
parent8fe8c69b597eec2bfda9b2fb2413751ee03ed8b5 (diff)
Merge pull request #10183 from vespa-engine/balder/add-maxredundancy-to-exception
Add maxRedundancy to exception message.
Diffstat (limited to 'vdslib/src')
-rw-r--r--vdslib/src/main/java/com/yahoo/vdslib/distribution/Group.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/vdslib/src/main/java/com/yahoo/vdslib/distribution/Group.java b/vdslib/src/main/java/com/yahoo/vdslib/distribution/Group.java
index e3caaeb455c..680021893f7 100644
--- a/vdslib/src/main/java/com/yahoo/vdslib/distribution/Group.java
+++ b/vdslib/src/main/java/com/yahoo/vdslib/distribution/Group.java
@@ -237,7 +237,9 @@ public class Group implements Comparable<Group> {
}
this.distributionSpec = distributionSpec;
// Create the pre calculated results
- if (maxRedundancy <= 0 || maxRedundancy > 255) throw new IllegalArgumentException("The max redundancy must be a positive number in the range 1-255.");
+ if (maxRedundancy <= 0 || maxRedundancy > 255) {
+ throw new IllegalArgumentException("The max redundancy (" + maxRedundancy + ") must be a positive number in the range 1-255.");
+ }
int asterixCount = distributionSpec.length - firstAsterix;
int[][] preCalculations = new int[maxRedundancy + 1][];
for (int i=1; i<=maxRedundancy; ++i) {