diff --git a/javasrc/org/hd/d/statsHouse/feedHits/data/FeedStatus.java b/javasrc/org/hd/d/statsHouse/feedHits/data/FeedStatus.java index 4c4fdba..14842d8 100644 --- a/javasrc/org/hd/d/statsHouse/feedHits/data/FeedStatus.java +++ b/javasrc/org/hd/d/statsHouse/feedHits/data/FeedStatus.java @@ -42,6 +42,8 @@ *

* All integer values are non-negative, all Strings are non-null, cols is non-null. *

+ * The colTypes element count must match cols. + *

* This makes an immutable copy of the cols data to ensure record immutability. */ public record FeedStatus(int hits, int bytes, String colTypes, List cols, String index) @@ -52,6 +54,7 @@ public record FeedStatus(int hits, int bytes, String colTypes, List col if(bytes < 0) { throw new IllegalArgumentException(); } Objects.nonNull(colTypes); Objects.nonNull(cols); + for(final int c : cols) { if(c < 0) { throw new IllegalArgumentException(); } } Objects.nonNull(index); if(cols.size() != colTypes.split(":").length) { throw new IllegalArgumentException("colTypes element count must match cols"); } }