Jian Li
Committed by Gerrit Code Review

Bugfix: only allow REMARK band to have a precedence

Change-Id: I3b47f6f78d409832c2a5ef9f059e1b48ba38deaf
...@@ -125,12 +125,10 @@ public final class DefaultBand implements Band, BandEntry { ...@@ -125,12 +125,10 @@ public final class DefaultBand implements Band, BandEntry {
125 125
126 @Override 126 @Override
127 public DefaultBand build() { 127 public DefaultBand build() {
128 - checkArgument(type != Type.REMARK && prec == null, 128 + checkArgument(type == Type.REMARK ^ prec == null,
129 - "Only REMARK bands can have a precendence."); 129 + "Only REMARK bands can have a precedence.");
130 130
131 return new DefaultBand(type, rate, burstSize, prec); 131 return new DefaultBand(type, rate, burstSize, prec);
132 } 132 }
133 -
134 -
135 } 133 }
136 } 134 }
......