Rename method isInvalidCommand() -> isInvalidCommand()

This commit is contained in:
Dmitry Isaenko 2020-05-09 17:51:48 +03:00
parent f630fd8042
commit 6816cff10d

View file

@ -102,7 +102,7 @@ class NxdtUsbAbi1 {
while (true){ while (true){
directive = readUsbCmd(); directive = readUsbCmd();
if (isInvalidCommand(directive)) if (isInvalidDirective(directive))
continue; continue;
command = getLEint(directive, 4); command = getLEint(directive, 4);
@ -132,7 +132,7 @@ class NxdtUsbAbi1 {
} }
}; };
private boolean isInvalidCommand(byte[] message) throws Exception{ private boolean isInvalidDirective(byte[] message) throws Exception{
if (! Arrays.equals(Arrays.copyOfRange(message, 0,4), MAGIC_NXDT)){ if (! Arrays.equals(Arrays.copyOfRange(message, 0,4), MAGIC_NXDT)){
writeUsb(USBSTATUS_INVALID_MAGIC); writeUsb(USBSTATUS_INVALID_MAGIC);
logPrinter.print("Invalid magic command", EMsgType.INFO); logPrinter.print("Invalid magic command", EMsgType.INFO);