SatlMessage lints
This commit is contained in:
parent
ed7a00dbc1
commit
4260ca7b11
1 changed files with 6 additions and 4 deletions
|
@ -105,10 +105,11 @@ public abstract class SatlMessage {
|
|||
if (packetLength != packetLengthXOR) throw new InvalidPacketLengthsException();
|
||||
if (version != VERSION) throw new IncompatibleSatlVersionException();
|
||||
if (clazz == null) throw new InvalidSatlCommandException();
|
||||
SatlMessage message = null;
|
||||
SatlMessage message;
|
||||
try {
|
||||
message = clazz.newInstance();
|
||||
} catch (Exception ignored) {
|
||||
} catch (Exception exception) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
message.parse(ByteBuf.from(payload));
|
||||
message.setNonce(parsedNonce);
|
||||
|
@ -135,10 +136,11 @@ public abstract class SatlMessage {
|
|||
if (packetLength != packetLengthXOR) throw new InvalidPacketLengthsException();
|
||||
if (version != VERSION) throw new IncompatibleSatlVersionException();
|
||||
if (clazz == null) throw new InvalidSatlCommandException();
|
||||
SatlMessage message = null;
|
||||
SatlMessage message;
|
||||
try {
|
||||
message = clazz.newInstance();
|
||||
} catch (Exception ignored) {
|
||||
} catch (Exception exception) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
message.parse(ByteBuf.from(payload));
|
||||
message.setNonce(Nonce.fromProductionalBytes(nonce));
|
||||
|
|
Loading…
Reference in a new issue