Committed by
Gerrit Code Review
[ONOS-2550]Fix validation incorrect information bugs of TunnelManager
Change-Id: I9bb7d0a7513d0c0b2674722e1107d4ec1f97f3d0
Showing
1 changed file
with
6 additions
and
6 deletions
... | @@ -80,11 +80,11 @@ public class LabelResourceManager | ... | @@ -80,11 +80,11 @@ public class LabelResourceManager |
80 | LabelResourceId endLabel) { | 80 | LabelResourceId endLabel) { |
81 | checkNotNull(deviceId, "deviceId is not null"); | 81 | checkNotNull(deviceId, "deviceId is not null"); |
82 | checkNotNull(beginLabel, "beginLabel is not null"); | 82 | checkNotNull(beginLabel, "beginLabel is not null"); |
83 | - checkNotNull(endLabel, "beginLabel is not null"); | 83 | + checkNotNull(endLabel, "endLabel is not null"); |
84 | checkArgument(beginLabel.labelId() >= 0 || endLabel.labelId() >= 0, | 84 | checkArgument(beginLabel.labelId() >= 0 || endLabel.labelId() >= 0, |
85 | "The value of beginLabel and the value of endLabel must be both positive number."); | 85 | "The value of beginLabel and the value of endLabel must be both positive number."); |
86 | - checkArgument(beginLabel.labelId() <= endLabel.labelId(), | 86 | + checkArgument(beginLabel.labelId() < endLabel.labelId(), |
87 | - "The value of endLabel must be greater than the value of endLabel."); | 87 | + "The value of endLabel must be greater than the value of beginLabel."); |
88 | return store.createDevicePool(deviceId, beginLabel, endLabel); | 88 | return store.createDevicePool(deviceId, beginLabel, endLabel); |
89 | } | 89 | } |
90 | 90 | ||
... | @@ -92,11 +92,11 @@ public class LabelResourceManager | ... | @@ -92,11 +92,11 @@ public class LabelResourceManager |
92 | public boolean createGlobalPool(LabelResourceId beginLabel, | 92 | public boolean createGlobalPool(LabelResourceId beginLabel, |
93 | LabelResourceId endLabel) { | 93 | LabelResourceId endLabel) { |
94 | checkNotNull(beginLabel, "beginLabel is not null"); | 94 | checkNotNull(beginLabel, "beginLabel is not null"); |
95 | - checkNotNull(endLabel, "beginLabel is not null"); | 95 | + checkNotNull(endLabel, "endLabel is not null"); |
96 | checkArgument(beginLabel.labelId() >= 0 && endLabel.labelId() >= 0, | 96 | checkArgument(beginLabel.labelId() >= 0 && endLabel.labelId() >= 0, |
97 | "The value of beginLabel and the value of endLabel must be both positive number."); | 97 | "The value of beginLabel and the value of endLabel must be both positive number."); |
98 | - checkArgument(beginLabel.labelId() <= endLabel.labelId(), | 98 | + checkArgument(beginLabel.labelId() < endLabel.labelId(), |
99 | - "The value of endLabel must be greater than the value of endLabel."); | 99 | + "The value of endLabel must be greater than the value of beginLabel."); |
100 | return store.createGlobalPool(beginLabel, endLabel); | 100 | return store.createGlobalPool(beginLabel, endLabel); |
101 | } | 101 | } |
102 | 102 | ... | ... |
-
Please register or login to post a comment