diff --git a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationDefinitionTO.java b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationDefinitionTO.java index 2f578fc1c0f..11426e34153 100644 --- a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationDefinitionTO.java +++ b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationDefinitionTO.java @@ -189,13 +189,21 @@ public boolean equals(Object o) { @Override public int hashCode() { int result = className != null ? className.hashCode() : 0; + result = ~~result; result = 31 * result + (name != null ? name.hashCode() : 0); + result = ~~result; result = 31 * result + (marker ? 1 : 0); + result = ~~result; result = 31 * result + (shortDescription != null ? shortDescription.hashCode() : 0); + result = ~~result; result = 31 * result + (description != null ? description.hashCode() : 0); + result = ~~result; result = 31 * result + (objectAnnotation ? 1 : 0); + result = ~~result; result = 31 * result + (propertyAnnotation ? 1 : 0); + result = ~~result; result = 31 * result + (annotationMembers != null ? annotationMembers.hashCode() : 0); + result = ~~result; return result; } } diff --git a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationMemberDefinitionTO.java b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationMemberDefinitionTO.java index ba064682785..21c55788b35 100644 --- a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationMemberDefinitionTO.java +++ b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationMemberDefinitionTO.java @@ -141,13 +141,21 @@ public boolean equals(Object o) { @Override public int hashCode() { int result = name != null ? name.hashCode() : 0; + result = ~~result; result = 31 * result + (description != null ? description.hashCode() : 0); + result = ~~result; result = 31 * result + (shortDescription != null ? shortDescription.hashCode() : 0); + result = ~~result; result = 31 * result + (defaultValue != null ? defaultValue.hashCode() : 0); + result = ~~result; result = 31 * result + (array ? 1 : 0); + result = ~~result; result = 31 * result + (className != null ? className.hashCode() : 0); + result = ~~result; result = 31 * result + (enumMember ? 1 : 0); + result = ~~result; result = 31 * result + (primitiveType ? 1 : 0); + result = ~~result; return result; } } diff --git a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationTO.java b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationTO.java index 29eb07d0ca2..59dcf9480b9 100644 --- a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationTO.java +++ b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/AnnotationTO.java @@ -120,9 +120,13 @@ public boolean equals(Object o) { @Override public int hashCode() { int result = className != null ? className.hashCode() : 0; + result = ~~result; result = 31 * result + (name != null ? name.hashCode() : 0); + result = ~~result; result = 31 * result + (annotationDefinition != null ? annotationDefinition.hashCode() : 0); + result = ~~result; result = 31 * result + (values != null ? values.hashCode() : 0); + result = ~~result; return result; } } diff --git a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/DataModelTO.java b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/DataModelTO.java index 9bf2e3f84cb..0628ea4eecb 100644 --- a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/DataModelTO.java +++ b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/DataModelTO.java @@ -215,11 +215,17 @@ public boolean equals(Object o) { @Override public int hashCode() { int result = parentProjectName != null ? parentProjectName.hashCode() : 0; + result = ~~result; result = 31 * result + (dataObjects != null ? dataObjects.hashCode() : 0); + result = ~~result; result = 31 * result + (sources != null ? sources.hashCode() : 0); + result = ~~result; result = 31 * result + (externalClasses != null ? externalClasses.hashCode() : 0); + result = ~~result; result = 31 * result + (deletedDataObjects != null ? deletedDataObjects.hashCode() : 0); + result = ~~result; result = 31 * result + id; + result = ~~result; return result; } } diff --git a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/DataObjectTO.java b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/DataObjectTO.java index 953109d2c2b..945220737c4 100644 --- a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/DataObjectTO.java +++ b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/DataObjectTO.java @@ -330,17 +330,29 @@ public boolean equals(Object o) { @Override public int hashCode() { int result = name != null ? name.hashCode() : 0; + result = ~~result; result = 31 * result + (packageName != null ? packageName.hashCode() : 0); + result = ~~result; result = 31 * result + (superClassName != null ? superClassName.hashCode() : 0); + result = ~~result; result = 31 * result + (status != null ? status.hashCode() : 0); + result = ~~result; result = 31 * result + (originalClassName != null ? originalClassName.hashCode() : 0); + result = ~~result; result = 31 * result + (properties != null ? properties.hashCode() : 0); + result = ~~result; result = 31 * result + (annotations != null ? annotations.hashCode() : 0); + result = ~~result; result = 31 * result + (fingerPrint != null ? fingerPrint.hashCode() : 0); + result = ~~result; result = 31 * result + (abstractModifier ? 1 : 0); + result = ~~result; result = 31 * result + (interfaceModifier ? 1 : 0); + result = ~~result; result = 31 * result + (finalModifier ? 1 : 0); + result = ~~result; result = 31 * result + (path != null ? path.hashCode() : 0); + result = ~~result; return result; } } \ No newline at end of file diff --git a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/ObjectPropertyTO.java b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/ObjectPropertyTO.java index 99324206524..d13431b9f6f 100644 --- a/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/ObjectPropertyTO.java +++ b/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-api/src/main/java/org/kie/workbench/common/screens/datamodeller/model/ObjectPropertyTO.java @@ -239,14 +239,23 @@ public boolean equals(Object o) { @Override public int hashCode() { int result = className != null ? className.hashCode() : 0; + result = ~~result; result = 31 * result + (name != null ? name.hashCode() : 0); + result = ~~result; result = 31 * result + (originalName != null ? originalName.hashCode() : 0); + result = ~~result; result = 31 * result + (multiple ? 1 : 0); + result = ~~result; result = 31 * result + (baseType ? 1 : 0); + result = ~~result; result = 31 * result + (bag != null ? bag.hashCode() : 0); + result = ~~result; result = 31 * result + modifiers; + result = ~~result; result = 31 * result + (annotations != null ? annotations.hashCode() : 0); + result = ~~result; result = 31 * result + (status != null ? status.hashCode() : 0); + result = ~~result; return result; } } \ No newline at end of file diff --git a/kie-wb-common-screens/kie-wb-common-project-editor/kie-wb-common-project-editor-client/src/main/java/org/kie/workbench/common/screens/projecteditor/client/forms/WaterMarkEditTextCell.java b/kie-wb-common-screens/kie-wb-common-project-editor/kie-wb-common-project-editor-client/src/main/java/org/kie/workbench/common/screens/projecteditor/client/forms/WaterMarkEditTextCell.java index 2c1be55f4b1..a757f923ac6 100644 --- a/kie-wb-common-screens/kie-wb-common-project-editor/kie-wb-common-project-editor-client/src/main/java/org/kie/workbench/common/screens/projecteditor/client/forms/WaterMarkEditTextCell.java +++ b/kie-wb-common-screens/kie-wb-common-project-editor/kie-wb-common-project-editor-client/src/main/java/org/kie/workbench/common/screens/projecteditor/client/forms/WaterMarkEditTextCell.java @@ -105,9 +105,11 @@ public String getText() { @Override public int hashCode() { - return original.hashCode() + text.hashCode() + int result = original.hashCode() + text.hashCode() + Boolean.valueOf( isEditing ).hashCode() * 29 + Boolean.valueOf( isEditingAgain ).hashCode(); + result = ~~result; + return result; } public boolean isEditing() { diff --git a/kie-wb-common-screens/kie-wb-common-project-explorer/kie-wb-common-project-explorer-api/src/main/java/org/kie/workbench/common/screens/explorer/model/FolderItem.java b/kie-wb-common-screens/kie-wb-common-project-explorer/kie-wb-common-project-explorer-api/src/main/java/org/kie/workbench/common/screens/explorer/model/FolderItem.java index 0bd7d0b3fc3..d4d4ed47bca 100644 --- a/kie-wb-common-screens/kie-wb-common-project-explorer/kie-wb-common-project-explorer-api/src/main/java/org/kie/workbench/common/screens/explorer/model/FolderItem.java +++ b/kie-wb-common-screens/kie-wb-common-project-explorer/kie-wb-common-project-explorer-api/src/main/java/org/kie/workbench/common/screens/explorer/model/FolderItem.java @@ -79,8 +79,11 @@ public boolean equals( Object o ) { @Override public int hashCode() { int result = item.hashCode(); + result = ~~result; result = 31 * result + itemName.hashCode(); + result = ~~result; result = 31 * result + type.hashCode(); + result = ~~result; return result; } diff --git a/kie-wb-common-screens/kie-wb-common-project-explorer/kie-wb-common-project-explorer-api/src/main/java/org/kie/workbench/common/screens/explorer/model/FolderListing.java b/kie-wb-common-screens/kie-wb-common-project-explorer/kie-wb-common-project-explorer-api/src/main/java/org/kie/workbench/common/screens/explorer/model/FolderListing.java index 910ef3eef66..6ec1bedb2f7 100644 --- a/kie-wb-common-screens/kie-wb-common-project-explorer/kie-wb-common-project-explorer-api/src/main/java/org/kie/workbench/common/screens/explorer/model/FolderListing.java +++ b/kie-wb-common-screens/kie-wb-common-project-explorer/kie-wb-common-project-explorer-api/src/main/java/org/kie/workbench/common/screens/explorer/model/FolderListing.java @@ -82,8 +82,11 @@ public boolean equals( Object o ) { @Override public int hashCode() { int result = item != null ? item.hashCode() : 0; + result = ~~result; result = 31 * result + ( content != null ? content.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( segments != null ? segments.hashCode() : 0 ); + result = ~~result; return result; } } diff --git a/kie-wb-common-screens/kie-wb-common-server-ui/kie-wb-common-server-ui-api/src/main/java/org/kie/workbench/common/screens/server/management/model/impl/ContainerRefImpl.java b/kie-wb-common-screens/kie-wb-common-server-ui/kie-wb-common-server-ui-api/src/main/java/org/kie/workbench/common/screens/server/management/model/impl/ContainerRefImpl.java index e80b219ad5a..5c626f9fd3d 100644 --- a/kie-wb-common-screens/kie-wb-common-server-ui/kie-wb-common-server-ui-api/src/main/java/org/kie/workbench/common/screens/server/management/model/impl/ContainerRefImpl.java +++ b/kie-wb-common-screens/kie-wb-common-server-ui/kie-wb-common-server-ui-api/src/main/java/org/kie/workbench/common/screens/server/management/model/impl/ContainerRefImpl.java @@ -88,7 +88,9 @@ public boolean equals( Object o ) { @Override public int hashCode() { int result = serverId.hashCode(); + result = ~~result; result = 31 * result + id.hashCode(); + result = ~~result; return result; } } diff --git a/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/FileLogger.java b/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/FileLogger.java index 70b6e61cf1a..0d64997f3f9 100644 --- a/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/FileLogger.java +++ b/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/FileLogger.java @@ -73,9 +73,13 @@ public boolean equals( Object o ) { @Override public int hashCode() { int result = name != null ? name.hashCode() : 0; + result = ~~result; result = 31 * result + ( file != null ? file.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( threaded ? 1 : 0 ); + result = ~~result; result = 31 * result + interval; + result = ~~result; return result; } } diff --git a/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/KBaseModel.java b/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/KBaseModel.java index b186e11099d..b14dbf8b16b 100644 --- a/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/KBaseModel.java +++ b/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/KBaseModel.java @@ -134,14 +134,23 @@ public boolean equals( Object o ) { @Override public int hashCode() { int result = name != null ? name.hashCode() : 0; + result = ~~result; result = 31 * result + ( equalsBehavior != null ? equalsBehavior.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( eventProcessingMode != null ? eventProcessingMode.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( kSessions != null ? kSessions.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( includes != null ? includes.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( theDefault ? 1 : 0 ); + result = ~~result; result = 31 * result + ( scope != null ? scope.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( packages != null ? packages.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( declarativeAgenda != null ? declarativeAgenda.hashCode() : 0 ); + result = ~~result; return result; } } diff --git a/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/KSessionModel.java b/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/KSessionModel.java index 2744e690149..513c92a6930 100644 --- a/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/KSessionModel.java +++ b/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/KSessionModel.java @@ -139,13 +139,21 @@ public boolean equals( Object o ) { @Override public int hashCode() { int result = name != null ? name.hashCode() : 0; + result = ~~result; result = 31 * result + ( type != null ? type.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( clockType != null ? clockType.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( theDefault ? 1 : 0 ); + result = ~~result; result = 31 * result + ( scope != null ? scope.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( workItemHandelerModels != null ? workItemHandelerModels.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( listeners != null ? listeners.hashCode() : 0 ); + result = ~~result; result = 31 * result + ( logger != null ? logger.hashCode() : 0 ); + result = ~~result; return result; } } diff --git a/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/ListenerModel.java b/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/ListenerModel.java index ee9c6688f98..ff2cd2c4804 100644 --- a/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/ListenerModel.java +++ b/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/kmodule/ListenerModel.java @@ -95,7 +95,9 @@ public boolean equals( Object o ) { @Override public int hashCode() { int result = kind != null ? kind.hashCode() : 0; + result = ~~result; result = 31 * result + ( type != null ? type.hashCode() : 0 ); + result = ~~result; return result; } } diff --git a/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/project/KieProject.java b/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/project/KieProject.java index 196964fd908..fd49d20fddf 100644 --- a/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/project/KieProject.java +++ b/kie-wb-common-services/kie-wb-common-services-api/src/main/java/org/kie/workbench/common/services/shared/project/KieProject.java @@ -98,11 +98,17 @@ public boolean equals( Object o ) { @Override public int hashCode() { int result = rootPath.hashCode(); + result = ~~result; result = 31 * result + pomXMLPath.hashCode(); + result = ~~result; result = 31 * result + kmoduleXMLPath.hashCode(); + result = ~~result; result = 31 * result + importsPath.hashCode(); + result = ~~result; result = 31 * result + packageNamesWhiteList.hashCode(); + result = ~~result; result = 31 * result + projectName.hashCode(); + result = ~~result; return result; } } diff --git a/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/CellValue.java b/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/CellValue.java index 4c50668d12f..ae2de5345f8 100644 --- a/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/CellValue.java +++ b/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/CellValue.java @@ -240,11 +240,17 @@ public T getValue() { public int hashCode() { int hash = 1; hash = hash * 31 + ( value == null ? 0 : value.hashCode() ); + hash = ~~hash; hash = hash * 31 + rowSpan; + hash = ~~hash; hash = hash * 31 + ( coordinate == null ? 0 : coordinate.hashCode() ); + hash = ~~hash; hash = hash * 31 + ( mapHtmlToData == null ? 0 : mapHtmlToData.hashCode() ); + hash = ~~hash; hash = hash * 31 + ( mapDataToHtml == null ? 0 : mapDataToHtml.hashCode() ); + hash = ~~hash; hash = hash * 31 + state.hashCode(); + hash = ~~hash; return hash; } diff --git a/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/DynamicColumn.java b/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/DynamicColumn.java index 53b37eaf13d..f5c3751a34e 100644 --- a/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/DynamicColumn.java +++ b/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/DynamicColumn.java @@ -149,30 +149,38 @@ public int getWidth() { @Override public int hashCode() { int hash = 7; + hash = ~~hash; hash = 31 * hash + columnIndex; + hash = ~~hash; hash = 31 * hash + modelColumn.hashCode(); + hash = ~~hash; hash = 31 * hash + isVisible.hashCode(); + hash = ~~hash; hash = 31 * hash + isSystemControlled.hashCode(); hash = 31 * hash + sortConfig.getSortDirection().hashCode(); + hash = ~~hash; hash = 31 * hash + sortConfig.isSortable().hashCode(); + hash = ~~hash; hash = 31 * hash + sortConfig.getSortIndex(); + hash = ~~hash; hash = 31 * hash + width; + hash = ~~hash; return hash; } diff --git a/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/data/Coordinate.java b/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/data/Coordinate.java index 82d0708d16e..a38e2ca654c 100644 --- a/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/data/Coordinate.java +++ b/kie-wb-common-widgets/kie-wb-decorated-grid-widget/src/main/java/org/kie/workbench/common/widgets/decoratedgrid/client/widget/data/Coordinate.java @@ -66,7 +66,9 @@ public boolean equals( Object o ) { @Override public int hashCode() { int hash = row; + hash = ~~hash; hash = 31 * hash + col; + hash = ~~hash; return hash; }