Optimize hashcode

This commit is contained in:
Andrea Cavalli 2022-02-20 17:17:47 +01:00
parent 14fd6fc4b2
commit c7ebf9e32f
10 changed files with 10 additions and 10 deletions

View File

@ -98,7 +98,7 @@ public class NullableInt52 implements Serializable, IGenericNullable {
@Override
public int hashCode() {
return Objects.hash(value);
return value == null ? 0 : value.hashCode();
}
@Override

View File

@ -114,7 +114,7 @@ public class NullableString implements Serializable, IGenericNullable {
@Override
public int hashCode() {
return Objects.hash(value);
return value == null ? 0 : value.hashCode();
}
@Override

View File

@ -96,7 +96,7 @@ public class Nullableboolean implements Serializable, IGenericNullable {
@Override
public int hashCode() {
return Objects.hash(value);
return value == null ? 0 : value.hashCode();
}
@Override

View File

@ -96,7 +96,7 @@ public class Nullablebyte implements Serializable, IGenericNullable {
@Override
public int hashCode() {
return Objects.hash(value);
return value == null ? 0 : value.hashCode();
}
@Override

View File

@ -96,7 +96,7 @@ public class Nullablechar implements Serializable, IGenericNullable {
@Override
public int hashCode() {
return Objects.hash(value);
return value == null ? 0 : value.hashCode();
}
@Override

View File

@ -96,7 +96,7 @@ public class Nullabledouble implements Serializable, IGenericNullable {
@Override
public int hashCode() {
return Objects.hash(value);
return value == null ? 0 : value.hashCode();
}
@Override

View File

@ -96,7 +96,7 @@ public class Nullablefloat implements Serializable, IGenericNullable {
@Override
public int hashCode() {
return Objects.hash(value);
return value == null ? 0 : value.hashCode();
}
@Override

View File

@ -96,7 +96,7 @@ public class Nullableint implements Serializable, IGenericNullable {
@Override
public int hashCode() {
return Objects.hash(value);
return value == null ? 0 : value.hashCode();
}
@Override

View File

@ -96,7 +96,7 @@ public class Nullablelong implements Serializable, IGenericNullable {
@Override
public int hashCode() {
return Objects.hash(value);
return value == null ? 0 : value.hashCode();
}
@Override

View File

@ -96,7 +96,7 @@ public class Nullableshort implements Serializable, IGenericNullable {
@Override
public int hashCode() {
return Objects.hash(value);
return value == null ? 0 : value.hashCode();
}
@Override