Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make IPAddress final #2200

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* The leading 11111111 is used in IPv6 to signify an IPv6 multicast address. Since a client will never be assigned a
* multicast address we can use this prefix to indicate an IPv4+MAC address.
*/
public class IPAddress implements Cloneable, Serializable {
public final class IPAddress implements Cloneable, Serializable {

private static final long serialVersionUID = -3749627756354392982L;

Expand All @@ -68,7 +68,7 @@ public class IPAddress implements Cloneable, Serializable {
public static final int IPV4MAC = 3; // iMQ IPV4 + MAC

// Format of address. One of above types
protected int type = UNKNOWN;
int type = UNKNOWN;

// Prefix used to create an IPv4-mapped IPv6 address
private static byte[] prefix = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xFF, (byte) 0xFF };
Expand All @@ -80,7 +80,7 @@ public class IPAddress implements Cloneable, Serializable {
private static byte[] nullAddr = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xFF, (byte) 0xFF, 0x0, 0x0, 0x0, 0x0 };

// 128 bit buffer to hold IP address. We always store address as IPv6
protected byte ip[] = new byte[IPV6_SIZE];
byte ip[] = new byte[IPV6_SIZE];

/**
* Construct an unititialized IP address
Expand Down
Loading