diff --git a/changelog.txt b/changelog.txt index 269f566440..22542f85ef 100644 --- a/changelog.txt +++ b/changelog.txt @@ -9573,4 +9573,7 @@ FilteredModel.AbstractRefresher.fireRefreshEvent() and fireRefreshFailedEvent() renamed refreshEvent() and refreshFailedEvent() DatabaseConnection.selectInteger() and selectLong() removed, now only handles transaction control AbstractQueriedKeyGenerator refactored - KeyGenerator.increment() implementation removed \ No newline at end of file + KeyGenerator.increment() implementation removed + AllCondition now interface, moved to Condition, renamed All + ColumnDefinition.resultPacker() removed, related refactoring + ColumnDefinition.toColumnValue() replaced with valueConverter() \ No newline at end of file diff --git a/common/core/src/main/java/is/codion/common/proxy/DefaultProxyBuilder.java b/common/core/src/main/java/is/codion/common/proxy/DefaultProxyBuilder.java index 6ba4a3a2d4..cdc9cef5cd 100644 --- a/common/core/src/main/java/is/codion/common/proxy/DefaultProxyBuilder.java +++ b/common/core/src/main/java/is/codion/common/proxy/DefaultProxyBuilder.java @@ -10,7 +10,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -192,7 +191,7 @@ public boolean equals(Object object) { @Override public int hashCode() { - int result = Objects.hash(methodName); + int result = methodName.hashCode(); result = 31 * result + Arrays.hashCode(parameterTypes); return result; diff --git a/common/model/src/main/java/is/codion/common/model/table/DefaultColumnConditionModel.java b/common/model/src/main/java/is/codion/common/model/table/DefaultColumnConditionModel.java index 754baf161e..83c8c6085e 100644 --- a/common/model/src/main/java/is/codion/common/model/table/DefaultColumnConditionModel.java +++ b/common/model/src/main/java/is/codion/common/model/table/DefaultColumnConditionModel.java @@ -29,16 +29,16 @@ final class DefaultColumnConditionModel implements ColumnConditionModel equalValue = equalValues.value(); private final Value upperBoundValue = Value.value(); private final Value lowerBoundValue = Value.value(); - private final Value operatorValue = Value.value(Operator.EQUAL, Operator.EQUAL); + private final Value operator = Value.value(Operator.EQUAL, Operator.EQUAL); private final Event conditionChangedEvent = Event.event(); - private final State caseSensitiveState; - private final Value automaticWildcardValue; + private final State caseSensitive; + private final Value automaticWildcard; private final char wildcard; - private final State autoEnableState; - private final State enabledState = State.state(); - private final State lockedState = State.state(); + private final State autoEnable; + private final State enabled = State.state(); + private final State locked = State.state(); private final C columnIdentifier; private final Class columnClass; @@ -53,15 +53,15 @@ private DefaultColumnConditionModel(DefaultBuilder builder) { this.wildcard = builder.wildcard; this.format = builder.format; this.dateTimePattern = builder.dateTimePattern; - this.automaticWildcardValue = Value.value(builder.automaticWildcard, AutomaticWildcard.NONE); - this.caseSensitiveState = State.state(builder.caseSensitive); - this.autoEnableState = State.state(builder.autoEnable); - this.enabledState.addValidator(value -> checkLock()); + this.automaticWildcard = Value.value(builder.automaticWildcard, AutomaticWildcard.NONE); + this.caseSensitive = State.state(builder.caseSensitive); + this.autoEnable = State.state(builder.autoEnable); + this.enabled.addValidator(value -> checkLock()); this.equalValues.addValidator(value -> checkLock()); this.upperBoundValue.addValidator(value -> checkLock()); this.lowerBoundValue.addValidator(value -> checkLock()); - this.operatorValue.addValidator(this::validateOperator); - this.operatorValue.addValidator(value -> checkLock()); + this.operator.addValidator(this::validateOperator); + this.operator.addValidator(value -> checkLock()); bindEvents(); } @@ -72,7 +72,7 @@ public C columnIdentifier() { @Override public State caseSensitive() { - return caseSensitiveState; + return caseSensitive; } @Override @@ -87,7 +87,7 @@ public String dateTimePattern() { @Override public State locked() { - return lockedState; + return locked; } @Override @@ -139,7 +139,7 @@ public T getLowerBound() { @Override public Value operator() { - return operatorValue; + return operator; } @Override @@ -154,31 +154,31 @@ public char wildcard() { @Override public State enabled() { - return enabledState; + return enabled; } @Override public Value automaticWildcard() { - return automaticWildcardValue; + return automaticWildcard; } @Override public State autoEnable() { - return autoEnableState; + return autoEnable; } @Override public void clear() { - enabledState.set(false); + enabled.set(false); setEqualValues(null); setUpperBound(null); setLowerBound(null); - operatorValue.set(Operator.EQUAL); + operator.set(Operator.EQUAL); } @Override public boolean accepts(Comparable columnValue) { - return !enabledState.get() || valueAccepted(columnValue); + return !enabled.get() || valueAccepted(columnValue); } @Override @@ -207,7 +207,7 @@ public void removeChangeListener(Runnable listener) { } private boolean valueAccepted(Comparable comparable) { - switch (operatorValue.get()) { + switch (operator.get()) { case EQUAL: return isEqual(comparable); case NOT_EQUAL: @@ -229,7 +229,7 @@ private boolean valueAccepted(Comparable comparable) { case NOT_BETWEEN: return isNotBetween(comparable); default: - throw new IllegalArgumentException("Undefined operator: " + operatorValue.get()); + throw new IllegalArgumentException("Undefined operator: " + operator.get()); } } @@ -275,7 +275,7 @@ private boolean isEqualWildcard(String value) { } String valueToTest = value; - if (!caseSensitiveState.get()) { + if (!caseSensitive.get()) { equalValue = equalValue.toUpperCase(); valueToTest = valueToTest.toUpperCase(); } @@ -420,7 +420,7 @@ private T addAutomaticWildcard(T bound) { if (!(bound instanceof String)) { return bound; } - switch (operatorValue.get()) { + switch (operator.get()) { //wildcard only used for EQUAL and NOT_EQUAL case EQUAL: case NOT_EQUAL: @@ -431,7 +431,7 @@ private T addAutomaticWildcard(T bound) { } private String addAutomaticWildcard(String value) { - switch (automaticWildcardValue.get()) { + switch (automaticWildcard.get()) { case PREFIX_AND_POSTFIX: return wildcard + value + wildcard; case PREFIX: @@ -448,19 +448,19 @@ private void bindEvents() { equalValues.addListener(autoEnableListener); upperBoundValue.addListener(autoEnableListener); lowerBoundValue.addListener(autoEnableListener); - operatorValue.addListener(autoEnableListener); - autoEnableState.addListener(autoEnableListener); + operator.addListener(autoEnableListener); + autoEnable.addListener(autoEnableListener); equalValues.addListener(conditionChangedEvent); upperBoundValue.addListener(conditionChangedEvent); lowerBoundValue.addListener(conditionChangedEvent); - operatorValue.addListener(conditionChangedEvent); - enabledState.addListener(conditionChangedEvent); - caseSensitiveState.addListener(conditionChangedEvent); - automaticWildcardValue.addListener(conditionChangedEvent); + operator.addListener(conditionChangedEvent); + enabled.addListener(conditionChangedEvent); + caseSensitive.addListener(conditionChangedEvent); + automaticWildcard.addListener(conditionChangedEvent); } private void checkLock() { - if (lockedState.get()) { + if (locked.get()) { throw new IllegalStateException("Condition model for column identified by " + columnIdentifier + " is locked"); } } @@ -475,28 +475,28 @@ private final class AutoEnableListener implements Runnable { @Override public void run() { - if (autoEnableState.get()) { - switch (operatorValue.get()) { + if (autoEnable.get()) { + switch (operator.get()) { case EQUAL: case NOT_EQUAL: - enabledState.set(equalValues.isNotEmpty()); + enabled.set(equalValues.isNotEmpty()); break; case LESS_THAN: case LESS_THAN_OR_EQUAL: - enabledState.set(upperBoundValue.isNotNull()); + enabled.set(upperBoundValue.isNotNull()); break; case GREATER_THAN: case GREATER_THAN_OR_EQUAL: - enabledState.set(lowerBoundValue.isNotNull()); + enabled.set(lowerBoundValue.isNotNull()); break; case BETWEEN: case BETWEEN_EXCLUSIVE: case NOT_BETWEEN: case NOT_BETWEEN_EXCLUSIVE: - enabledState.set(lowerBoundValue.isNotNull() && upperBoundValue.isNotNull()); + enabled.set(lowerBoundValue.isNotNull() && upperBoundValue.isNotNull()); break; default: - throw new IllegalStateException("Unknown operator: " + operatorValue.get()); + throw new IllegalStateException("Unknown operator: " + operator.get()); } } } diff --git a/common/model/src/main/java/is/codion/common/model/table/DefaultColumnSummaryModel.java b/common/model/src/main/java/is/codion/common/model/table/DefaultColumnSummaryModel.java index d7c526757d..172b03b910 100644 --- a/common/model/src/main/java/is/codion/common/model/table/DefaultColumnSummaryModel.java +++ b/common/model/src/main/java/is/codion/common/model/table/DefaultColumnSummaryModel.java @@ -19,31 +19,31 @@ */ final class DefaultColumnSummaryModel implements ColumnSummaryModel { - private final Value summaryValue = Value.value(ColumnSummary.NONE, ColumnSummary.NONE); - private final Value summaryTextValue = Value.value(); - private final State lockedState = State.state(); + private final Value summary = Value.value(ColumnSummary.NONE, ColumnSummary.NONE); + private final Value summaryText = Value.value(); + private final State locked = State.state(); private final SummaryValueProvider valueProvider; private final List summaries = asList(ColumnSummary.values()); DefaultColumnSummaryModel(SummaryValueProvider valueProvider) { this.valueProvider = requireNonNull(valueProvider); - this.summaryValue.addValidator(summary -> { - if (lockedState.get()) { + this.summary.addValidator(summary -> { + if (locked.get()) { throw new IllegalStateException("Summary model is locked"); } }); this.valueProvider.addListener(this::updateSummary); - this.summaryValue.addListener(this::updateSummary); + this.summary.addListener(this::updateSummary); } @Override public State locked() { - return lockedState; + return locked; } @Override public Value summary() { - return summaryValue; + return summary; } @Override @@ -53,11 +53,11 @@ public List summaries() { @Override public ValueObserver summaryText() { - return summaryTextValue.observer(); + return summaryText.observer(); } private void updateSummary() { - summaryTextValue.set(summary().get().summary(valueProvider)); + summaryText.set(summary().get().summary(valueProvider)); } static final class DefaultSummaryValues implements ColumnSummaryModel.SummaryValues { diff --git a/framework/db-core/src/main/java/is/codion/framework/db/condition/Condition.java b/framework/db-core/src/main/java/is/codion/framework/db/condition/Condition.java index 92991e5695..7600629485 100644 --- a/framework/db-core/src/main/java/is/codion/framework/db/condition/Condition.java +++ b/framework/db-core/src/main/java/is/codion/framework/db/condition/Condition.java @@ -69,6 +69,11 @@ public interface Condition { */ String toString(EntityDefinition definition); + /** + * A condition specifying all entities of a given type. + */ + interface All extends Condition {} + /** * An interface encapsulating a combination of Condition instances, * that should be either AND'ed or OR'ed together in a query context @@ -91,7 +96,7 @@ interface Combination extends Condition { * @return a Condition specifying all entities of the given type */ static Condition all(EntityType entityType) { - return new AllCondition(entityType); + return new DefaultAllCondition(entityType); } /** diff --git a/framework/db-core/src/main/java/is/codion/framework/db/condition/AllCondition.java b/framework/db-core/src/main/java/is/codion/framework/db/condition/DefaultAllCondition.java similarity index 76% rename from framework/db-core/src/main/java/is/codion/framework/db/condition/AllCondition.java rename to framework/db-core/src/main/java/is/codion/framework/db/condition/DefaultAllCondition.java index f2b2057562..5add625fee 100644 --- a/framework/db-core/src/main/java/is/codion/framework/db/condition/AllCondition.java +++ b/framework/db-core/src/main/java/is/codion/framework/db/condition/DefaultAllCondition.java @@ -12,11 +12,11 @@ import static java.util.Collections.emptyList; import static java.util.Objects.requireNonNull; -public final class AllCondition extends AbstractCondition implements Serializable { +final class DefaultAllCondition extends AbstractCondition implements Condition.All, Serializable { private static final long serialVersionUID = 1; - AllCondition(EntityType entityType) { + DefaultAllCondition(EntityType entityType) { super(entityType, emptyList(), emptyList()); } @@ -31,15 +31,15 @@ public boolean equals(Object object) { if (this == object) { return true; } - if (!(object instanceof AllCondition)) { + if (!(object instanceof All)) { return false; } - AllCondition that = (AllCondition) object; + All that = (All) object; return Objects.equals(entityType(), that.entityType()); } @Override public int hashCode() { - return Objects.hash(entityType()); + return entityType().hashCode(); } } diff --git a/framework/db-local/src/main/java/is/codion/framework/db/local/DefaultLocalEntityConnection.java b/framework/db-local/src/main/java/is/codion/framework/db/local/DefaultLocalEntityConnection.java index c74f371aa3..0d4df1b738 100644 --- a/framework/db-local/src/main/java/is/codion/framework/db/local/DefaultLocalEntityConnection.java +++ b/framework/db-local/src/main/java/is/codion/framework/db/local/DefaultLocalEntityConnection.java @@ -508,7 +508,7 @@ public List select(Column column, Select select) throws DatabaseExcept try { statement = prepareStatement(selectQuery); resultSet = executeStatement(statement, selectQuery, combinedCondition, entityDefinition); - List result = columnDefinition.resultPacker().pack(resultSet); + List result = resultPacker(columnDefinition).pack(resultSet); commitIfTransactionIsNotOpen(); return result; @@ -1348,6 +1348,10 @@ private static List> columnDefinitions(EntityDefinition enti .collect(toList()); } + private static ResultPacker resultPacker(ColumnDefinition columnDefinition) { + return resultSet -> columnDefinition.get(resultSet, 1); + } + private static void setParameterValues(PreparedStatement statement, List> statementColumns, List statementValues) throws SQLException { if (statementValues.isEmpty()) { @@ -1365,7 +1369,7 @@ private static void setParameterValues(PreparedStatement statement, List columnDefinition, Object value, int parameterIndex) throws SQLException { - Object columnValue = columnDefinition.toColumnValue(value, statement); + Object columnValue = columnDefinition.valueConverter().toColumnValue(value, statement); try { if (columnValue == null) { statement.setNull(parameterIndex, columnDefinition.columnType()); @@ -1442,7 +1446,7 @@ private static String createValueString(List values, List Object columnValue; String stringValue; try { - columnValue = columnDefinition.toColumnValue(value, null); + columnValue = columnDefinition.valueConverter().toColumnValue(value, null); stringValue = String.valueOf(value); } catch (SQLException e) { diff --git a/framework/domain/src/main/java/is/codion/framework/domain/entity/AbstractQueriedKeyGenerator.java b/framework/domain/src/main/java/is/codion/framework/domain/entity/AbstractQueriedKeyGenerator.java index 786b1229d1..dcf647d5cd 100644 --- a/framework/domain/src/main/java/is/codion/framework/domain/entity/AbstractQueriedKeyGenerator.java +++ b/framework/domain/src/main/java/is/codion/framework/domain/entity/AbstractQueriedKeyGenerator.java @@ -12,7 +12,6 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.List; import static is.codion.common.db.connection.DatabaseConnection.SQL_STATE_NO_DATA; @@ -37,12 +36,11 @@ protected final void selectAndPopulate(Entity entity, ColumnDefinition co try { statement = connection.prepareStatement(query); resultSet = statement.executeQuery(); - List result = columnDefinition.resultPacker().pack(resultSet, -1); - if (result.isEmpty()) { - throw new SQLException("No records returned when querying for a key value", SQL_STATE_NO_DATA); + if (!resultSet.next()) { + throw new SQLException("No rows returned when querying for a key value", SQL_STATE_NO_DATA); } - entity.put(columnDefinition.attribute(), result.get(0)); + entity.put(columnDefinition.attribute(), columnDefinition.get(resultSet, 1)); } catch (SQLException e) { exception = e; diff --git a/framework/domain/src/main/java/is/codion/framework/domain/entity/DefaultOrderBy.java b/framework/domain/src/main/java/is/codion/framework/domain/entity/DefaultOrderBy.java index efb5dc0a30..c6227f4f2b 100644 --- a/framework/domain/src/main/java/is/codion/framework/domain/entity/DefaultOrderBy.java +++ b/framework/domain/src/main/java/is/codion/framework/domain/entity/DefaultOrderBy.java @@ -42,7 +42,7 @@ public boolean equals(Object object) { @Override public int hashCode() { - return Objects.hash(orderByColumns); + return orderByColumns.hashCode(); } @Override diff --git a/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/Column.java b/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/Column.java index 10eef439a8..4f6dfcff39 100644 --- a/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/Column.java +++ b/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/Column.java @@ -11,6 +11,10 @@ import java.sql.Statement; import java.util.List; +/** + * An {@link Attribute} representing a table column. + * @param the column value type + */ public interface Column extends Attribute { /** diff --git a/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/ColumnDefinition.java b/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/ColumnDefinition.java index 9f7246a687..33227914be 100644 --- a/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/ColumnDefinition.java +++ b/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/ColumnDefinition.java @@ -3,11 +3,10 @@ */ package is.codion.framework.domain.entity.attribute; -import is.codion.common.db.result.ResultPacker; +import is.codion.framework.domain.entity.attribute.Column.ValueConverter; import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.Statement; /** * Specifies a attribute definition based on a table column @@ -34,16 +33,10 @@ public interface ColumnDefinition extends AttributeDefinition { int columnType(); /** - * Translates the given value into a sql value, usually this is not required - * but for certain types this may be necessary, such as boolean values - * represented by a non-boolean data type in the underlying database - * @param value the value to translate - * @param statement the statement using the column value - * @param the column value type - * @return the sql value used to represent the given value - * @throws java.sql.SQLException in case of an exception + * @return the {@link ValueConverter} for this column. + * @param the colum value type */ - C toColumnValue(T value, Statement statement) throws SQLException; + ValueConverter valueConverter(); /** * @return this columns zero based index in the primary key, -1 if this column is not part of a primary key @@ -100,17 +93,12 @@ public interface ColumnDefinition extends AttributeDefinition { /** * Fetches a value for this column from a ResultSet * @param resultSet the ResultSet - * @param index the index of the column to fetch + * @param index this columns index in the result * @return a single value fetched from the given ResultSet * @throws SQLException in case of an exception */ T get(ResultSet resultSet, int index) throws SQLException; - /** - * @return a ResultPacker responsible for packing this column - */ - ResultPacker resultPacker(); - /** * Builds a {@link ColumnDefinition} * @param the underlying type @@ -119,23 +107,23 @@ public interface ColumnDefinition extends AttributeDefinition { interface Builder> extends AttributeDefinition.Builder { /** - * Sets the actual column type, and the required {@link Column.ValueConverter}. + * Sets the actual column type, and the required {@link ValueConverter}. * @param the column type * @param columnClass the underlying column type class * @param valueConverter the converter to use when converting to and from column values * @return this instance */ - B columnClass(Class columnClass, Column.ValueConverter valueConverter); + B columnClass(Class columnClass, ValueConverter valueConverter); /** - * Sets the actual column type, and the required {@link Column.ValueConverter}. + * Sets the actual column type, and the required {@link ValueConverter}. * @param the column type * @param columnClass the underlying column type class * @param valueConverter the converter to use when converting to and from column values * @param valueFetcher the value fetcher used to retrieve the value from a ResultSet * @return this instance */ - B columnClass(Class columnClass, Column.ValueConverter valueConverter, Column.ValueFetcher valueFetcher); + B columnClass(Class columnClass, ValueConverter valueConverter, Column.ValueFetcher valueFetcher); /** * Sets the actual string used as column when querying diff --git a/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/DefaultColumnDefinition.java b/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/DefaultColumnDefinition.java index 47ea77aca4..160bc072fe 100644 --- a/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/DefaultColumnDefinition.java +++ b/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/DefaultColumnDefinition.java @@ -3,7 +3,6 @@ */ package is.codion.framework.domain.entity.attribute; -import is.codion.common.db.result.ResultPacker; import is.codion.framework.domain.entity.attribute.Column.ValueConverter; import is.codion.framework.domain.entity.attribute.Column.ValueFetcher; @@ -40,7 +39,6 @@ class DefaultColumnDefinition extends AbstractAttributeDefinition implemen private final boolean updatable; private final boolean searchColumn; - private final transient ResultPacker resultPacker = new ColumnResultPacker(); private final transient String columnName; private final transient String columnExpression; private final transient ValueFetcher valueFetcher; @@ -87,8 +85,8 @@ public final int columnType() { } @Override - public final C toColumnValue(T value, Statement statement) throws SQLException { - return (C) valueConverter.toColumnValue(value, statement); + public final ValueConverter valueConverter() { + return (ValueConverter) valueConverter; } @Override @@ -146,19 +144,6 @@ public final T get(ResultSet resultSet, int index) throws SQLException { return valueConverter.fromColumnValue(valueFetcher.get(resultSet, index)); } - @Override - public final ResultPacker resultPacker() { - return resultPacker; - } - - private class ColumnResultPacker implements ResultPacker { - - @Override - public T get(ResultSet resultSet) throws SQLException { - return DefaultColumnDefinition.this.get(resultSet, 1); - } - } - private static final class DefaultValueConverter implements ValueConverter { @Override public Object toColumnValue(Object value, Statement statement) { diff --git a/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/ForeignKey.java b/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/ForeignKey.java index 5d464ae2cd..6644389edf 100644 --- a/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/ForeignKey.java +++ b/framework/domain/src/main/java/is/codion/framework/domain/entity/attribute/ForeignKey.java @@ -8,6 +8,9 @@ import java.util.List; +/** + * An {@link Attribute} representing a foreign key relation. + */ public interface ForeignKey extends Attribute { /** diff --git a/framework/json-db/src/main/java/is/codion/framework/json/db/ConditionSerializer.java b/framework/json-db/src/main/java/is/codion/framework/json/db/ConditionSerializer.java index 7b97dcfc07..2a9fa07acc 100644 --- a/framework/json-db/src/main/java/is/codion/framework/json/db/ConditionSerializer.java +++ b/framework/json-db/src/main/java/is/codion/framework/json/db/ConditionSerializer.java @@ -3,9 +3,9 @@ */ package is.codion.framework.json.db; -import is.codion.framework.db.condition.AllCondition; import is.codion.framework.db.condition.ColumnCondition; import is.codion.framework.db.condition.Condition; +import is.codion.framework.db.condition.Condition.All; import is.codion.framework.db.condition.Condition.Combination; import is.codion.framework.db.condition.CustomCondition; import is.codion.framework.json.domain.EntityObjectMapper; @@ -54,7 +54,7 @@ else if (condition instanceof CustomCondition) { CustomCondition customCondition = (CustomCondition) condition; customConditionSerializer.serialize(customCondition, generator); } - else if (condition instanceof AllCondition) { + else if (condition instanceof All) { generator.writeStartObject(); generator.writeStringField("type", "all"); generator.writeStringField("entityType", condition.entityType().name()); diff --git a/swing/common-model-tools/src/main/java/is/codion/swing/common/model/tools/loadtest/LoadTestModel.java b/swing/common-model-tools/src/main/java/is/codion/swing/common/model/tools/loadtest/LoadTestModel.java index 94c72a605e..8897ce5c2b 100644 --- a/swing/common-model-tools/src/main/java/is/codion/swing/common/model/tools/loadtest/LoadTestModel.java +++ b/swing/common-model-tools/src/main/java/is/codion/swing/common/model/tools/loadtest/LoadTestModel.java @@ -883,7 +883,7 @@ public boolean equals(Object object) { @Override public int hashCode() { - return Objects.hash(application); + return application.hashCode(); } }