Skip to content
Snippets Groups Projects
Commit 2216831a authored by Jacob Chappell's avatar Jacob Chappell
Browse files

Fixed minor code consistency issues.

parent 436c887a
No related branches found
No related tags found
No related merge requests found
...@@ -115,9 +115,9 @@ public class IPv6 extends BasePacket { ...@@ -115,9 +115,9 @@ public class IPv6 extends BasePacket {
public byte[] serialize() { public byte[] serialize() {
// Get the raw bytes of the payload we encapsulate. // Get the raw bytes of the payload we encapsulate.
byte[] payloadData = null; byte[] payloadData = null;
if (payload != null) { if (this.payload != null) {
payload.setParent(this); this.payload.setParent(this);
payloadData = payload.serialize(); payloadData = this.payload.serialize();
} }
// Update our internal payload length. // Update our internal payload length.
this.payloadLength = (short) ((payloadData != null) ? payloadData.length : 0); this.payloadLength = (short) ((payloadData != null) ? payloadData.length : 0);
...@@ -168,8 +168,8 @@ public class IPv6 extends BasePacket { ...@@ -168,8 +168,8 @@ public class IPv6 extends BasePacket {
bb.get(sourceAddress, 0, 16); bb.get(sourceAddress, 0, 16);
byte[] destinationAddress = new byte[16]; byte[] destinationAddress = new byte[16];
bb.get(destinationAddress, 0, 16); bb.get(destinationAddress, 0, 16);
this.sourceAddress = IPv6Address.of( sourceAddress ); this.sourceAddress = IPv6Address.of(sourceAddress);
this.destinationAddress = IPv6Address.of( destinationAddress ); this.destinationAddress = IPv6Address.of(destinationAddress);
// Retrieve the payload, if possible. // Retrieve the payload, if possible.
IPacket payload; IPacket payload;
if (IPv6.nextHeaderClassMap.containsKey(this.nextHeader)) { if (IPv6.nextHeaderClassMap.containsKey(this.nextHeader)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment