mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-11-03 17:51:26 +01:00
Bugfix: only allow REMARK band to have a precedence
Change-Id: I3b47f6f78d409832c2a5ef9f059e1b48ba38deaf
This commit is contained in:
parent
1dfef09812
commit
1684b00a21
@ -125,12 +125,10 @@ public final class DefaultBand implements Band, BandEntry {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DefaultBand build() {
|
public DefaultBand build() {
|
||||||
checkArgument(type != Type.REMARK && prec == null,
|
checkArgument(type == Type.REMARK ^ prec == null,
|
||||||
"Only REMARK bands can have a precendence.");
|
"Only REMARK bands can have a precedence.");
|
||||||
|
|
||||||
return new DefaultBand(type, rate, burstSize, prec);
|
return new DefaultBand(type, rate, burstSize, prec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user