I have an update page of users of a website. Some columns of user
were coded in an enum. All the information of user
goes to a POJO and all the columns were hashed.
My problem is, when I open this update page and update some information of any user
, It Works successfully. However, when I open this web page in another computer, the update process does not work clearly.
I looked at the hash codes of columns by using 'system.out.println' and I saw two different computers produced two different hash codes in columns which are done with the enum base.
I hope that my problem is clear. Thanks for any reply.
@Override
public int hashCode() {
int hash = 3;
hash = 79 * hash + (this.getId() != null ? this.getId().hashCode() : 0);
hash = 79 * hash + (this.kullaniciTipi != null ? this.kullaniciTipi.hashCode() : 0);
hash = 79 * hash + (this.kullaniciAdi != null ? this.kullaniciAdi.hashCode() : 0);
hash = 79 * hash + (this.parola != null ? this.parola.hashCode() : 0);
hash = 79 * hash + Arrays.hashCode(this.parmakIzi);
hash = 79 * hash + (this.zamanAsimi != null ? this.zamanAsimi.hashCode() : 0);
hash = 79 * hash + (this.tcKimlikNo != null ? this.tcKimlikNo.hashCode() : 0);
hash = 79 * hash + (this.adiSoyadi != null ? this.adiSoyadi.hashCode() : 0);
hash = 79 * hash + (this.epostaAdresi != null ? this.epostaAdresi.hashCode() : 0);
hash = 79 * hash + (this.ekranKisayol != null ? this.ekranKisayol.hashCode() : 0);
hash = 79 * hash + (this.hataliGirisSayisi != null ? this.hataliGirisSayisi.hashCode() : 0);
hash = 79 * hash + Objects.hashCode(this.durum);
hash = 79 * hash + (this.durum != null ? this.durum.hashCode() : 0);
System.out.println("id : " + this.getId() + "id hash : " +this.getId().hashCode());
System.out.println("zid : " + this.zamanAsimi + "zid hash : " +this.zamanAsimi.hashCode());
System.out.println("this.kullaniciTipi.hashCode()" + this.kullaniciTipi.hashCode());
System.out.println("this.kullaniciAdi.hashCode()" + this.kullaniciAdi.hashCode());
System.out.println("this.parola.hashCode()" + this.parola.hashCode());
// System.out.println("this.parmakIzi.hashCode()" + this.parmakIzi.hashCode());
System.out.println("this.zamanAsimi.hashCode()" + this.zamanAsimi.hashCode());
System.out.println("this.tcKimlikNo.hashCode()" + this.tcKimlikNo.hashCode());
System.out.println("this.adiSoyadi.hashCode()" + this.adiSoyadi.hashCode());
System.out.println("this.epostaAdresi.hashCode()" + this.epostaAdresi.hashCode());
// System.out.println("this.ekranKisayol.hashCode()" + this.ekranKisayol.hashCode());
System.out.println("this.hataliGirisSayisi.hashCode()" + this.hataliGirisSayisi.hashCode());
System.out.println("this.durum.hashCode()" + this.durum.hashCode());
System.out.println("sistem hash : " +hash);
return hash;
}