Make payload classes final, extract Attachment in own class

This commit is contained in:
Manfred Karrer 2016-02-18 13:05:35 +01:00
parent 800013768b
commit 245d41f07d
9 changed files with 69 additions and 65 deletions

View file

@ -6,7 +6,7 @@ import java.io.Serializable;
import java.util.Arrays;
// Util for comparing byte arrays
public class ByteArray implements Serializable {
public final class ByteArray implements Serializable {
// That object is sent over the wire, so we need to take care of version compatibility.
private static final long serialVersionUID = Version.P2P_NETWORK_VERSION;

View file

@ -35,7 +35,7 @@ import java.security.spec.X509EncodedKeySpec;
* Same as KeyRing but with public keys only.
* Used to send public keys over the wire to other peer.
*/
public class PubKeyRing implements Serializable {
public final class PubKeyRing implements Serializable {
// That object is sent over the wire, so we need to take care of version compatibility.
private static final long serialVersionUID = Version.P2P_NETWORK_VERSION;