Hi Valerie

I take a look at krb5 codes and find many classes Cloneable.

These 6 can be easily changed to immutable:

  Realm.java
  AuthorizationData.java
  AuthorizationDataEntry.java
  HostAddress.java
  HostAddresses.java
  Ticket.java

This one has internal states, but I see no one clone it:
  crc32.java

This one has setMicroSeconds(), probably should be pulled out (and then made immutable):
  KerberosTime.java

This one has setSalt() and setRealm(), keep it unchanged:
  PrincipalName.java

These two have secrets inside to destroy(), keep it unchanged:
  EncryptedData.java
  EncryptionKey.java

I plan to change the first 7 ones to final immutable first.

Any suggestions?

Thanks
Max

Reply via email to