Committed by
Gerrit Code Review
Add failed value as Exception message.
Change-Id: Ieb22f4429d7d8ef17f9c4507f4a229cdf80f1a92
Showing
1 changed file
with
7 additions
and
7 deletions
... | @@ -172,9 +172,9 @@ public class OchSignal implements Lambda { | ... | @@ -172,9 +172,9 @@ public class OchSignal implements Lambda { |
172 | * @return sorted set of flex grid OCh lambdas | 172 | * @return sorted set of flex grid OCh lambdas |
173 | */ | 173 | */ |
174 | public static SortedSet<OchSignal> toFlexGrid(OchSignal ochSignal) { | 174 | public static SortedSet<OchSignal> toFlexGrid(OchSignal ochSignal) { |
175 | - checkArgument(ochSignal.gridType() != GridType.FLEX); | 175 | + checkArgument(ochSignal.gridType() != GridType.FLEX, ochSignal.gridType()); |
176 | - checkArgument(ochSignal.channelSpacing() != ChannelSpacing.CHL_6P25GHZ); | 176 | + checkArgument(ochSignal.channelSpacing() != ChannelSpacing.CHL_6P25GHZ, ochSignal.channelSpacing()); |
177 | - checkArgument(FIXED_GRID_SLOT_GRANULARITIES.contains(ochSignal.slotGranularity())); | 177 | + checkArgument(FIXED_GRID_SLOT_GRANULARITIES.contains(ochSignal.slotGranularity()), ochSignal.slotGranularity()); |
178 | 178 | ||
179 | int startMultiplier = (int) (1 - ochSignal.slotGranularity() + | 179 | int startMultiplier = (int) (1 - ochSignal.slotGranularity() + |
180 | ochSignal.spacingMultiplier() * ochSignal.channelSpacing().frequency().asHz() / | 180 | ochSignal.spacingMultiplier() * ochSignal.channelSpacing().frequency().asHz() / |
... | @@ -195,10 +195,10 @@ public class OchSignal implements Lambda { | ... | @@ -195,10 +195,10 @@ public class OchSignal implements Lambda { |
195 | public static OchSignal toFixedGrid(List<OchSignal> lambdas, ChannelSpacing spacing) { | 195 | public static OchSignal toFixedGrid(List<OchSignal> lambdas, ChannelSpacing spacing) { |
196 | // Number of slots of 12.5 GHz that fit into requested spacing | 196 | // Number of slots of 12.5 GHz that fit into requested spacing |
197 | int ratio = (int) (spacing.frequency().asHz() / ChannelSpacing.CHL_12P5GHZ.frequency().asHz()); | 197 | int ratio = (int) (spacing.frequency().asHz() / ChannelSpacing.CHL_12P5GHZ.frequency().asHz()); |
198 | - checkArgument(lambdas.size() == ratio); | 198 | + checkArgument(lambdas.size() == ratio, "%s != %s", lambdas.size(), ratio); |
199 | - lambdas.forEach(x -> checkArgument(x.gridType() == GridType.FLEX)); | 199 | + lambdas.forEach(x -> checkArgument(x.gridType() == GridType.FLEX, x.gridType())); |
200 | - lambdas.forEach(x -> checkArgument(x.channelSpacing() == ChannelSpacing.CHL_6P25GHZ)); | 200 | + lambdas.forEach(x -> checkArgument(x.channelSpacing() == ChannelSpacing.CHL_6P25GHZ, x.channelSpacing())); |
201 | - lambdas.forEach(x -> checkArgument(x.slotGranularity() == 1)); | 201 | + lambdas.forEach(x -> checkArgument(x.slotGranularity() == 1, x.slotGranularity())); |
202 | // Consecutive lambdas (multiplier increments by 2 because spacing is 6.25 GHz but slot width is 12.5 GHz) | 202 | // Consecutive lambdas (multiplier increments by 2 because spacing is 6.25 GHz but slot width is 12.5 GHz) |
203 | IntStream.range(1, lambdas.size()) | 203 | IntStream.range(1, lambdas.size()) |
204 | .forEach(i -> checkArgument( | 204 | .forEach(i -> checkArgument( | ... | ... |
-
Please register or login to post a comment