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 {
@Override
public DefaultBand build() {
checkArgument(type != Type.REMARK && prec == null,
"Only REMARK bands can have a precendence.");
checkArgument(type == Type.REMARK ^ prec == null,
"Only REMARK bands can have a precedence.");
return new DefaultBand(type, rate, burstSize, prec);
}
}
}
......