Bug in public NurCmdLock(boolean secured, int passwd, int sBank, int sAddress, int sMaskBitLength, byte[] sMask, int memoryMask, int action, boolean raw) constructor #16
Begin code of the constructor is:
public NurCmdLock(boolean secured, int passwd, int sBank, int sAddress, int sMaskBitLength, byte[] sMask, int memoryMask, int action, boolean raw) throws NurApiException {
super(54, 0, 18 + sMaskBitLength);
if (action <= 3 && sMaskBitLength <= 255) {
this.mNoAccessPwd = !secured;
if (raw) {
this.mMemoryMask = memoryMask;
this.mAction = action;
} else {
...
in case of raw = true, action value should not be checked (action <= 3). Otherwise it causes wrong "Invalid parameter" exception.
Begin code of the constructor is: public NurCmdLock(boolean secured, int passwd, int sBank, int sAddress, int sMaskBitLength, byte[] sMask, int memoryMask, int action, boolean raw) throws NurApiException { super(54, 0, 18 + sMaskBitLength); if (action <= 3 && sMaskBitLength <= 255) { this.mNoAccessPwd = !secured; if (raw) { this.mMemoryMask = memoryMask; this.mAction = action; } else { ... in case of raw = true, action value should not be checked (action <= 3). Otherwise it causes wrong "Invalid parameter" exception.