Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Add missing annotations
Browse files Browse the repository at this point in the history
When the workflow service starts, it complains about missing functions:

```
2023-05-23 20:42:48.386  WARN 3563913 --- [         task-1] o.h.t.d.java.JavaTypeDescriptorRegistry  : HHH000481: Encountered Java type [class com.redhat.parodos.workflows.work.WorkContext] for which we could not locate a JavaTypeDescriptor and which does not appear to implement equals and/or hashCode.  This can lead to significant performance problems when performing equality/dirty checking involving this Java type.  Consider registering a custom JavaTypeDescriptor or at least implementing equals/hashCode.
2023-05-23 20:42:48.785  WARN 3563913 --- [         task-1] org.hibernate.mapping.RootClass          : HHH000038: Composite-id class does not override equals(): com.redhat.parodos.project.entity.ProjectUserRole$Id
2023-05-23 20:42:48.785  WARN 3563913 --- [         task-1] org.hibernate.mapping.RootClass          : HHH000039: Composite-id class does not override hashCode(): com.redhat.parodos.project.entity.ProjectUserRole$Idis
```

Those warnings can be solved by adding the @DaTa annotation which adds
the needed functionality.

Signed-off-by: Moti Asayag <[email protected]>
  • Loading branch information
masayag authored and openshift-merge-robot committed May 24, 2023
1 parent c74400b commit 97fccfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

import lombok.Data;

/**
* Work execution context. This can be used to pass initial parameters to the workflow and
* share data between work units.
Expand All @@ -35,6 +37,7 @@
*
* @author Mahmoud Ben Hassine ([email protected])
*/
@Data
public class WorkContext {

private final Map<String, Object> context = new ConcurrentHashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
import com.redhat.parodos.user.entity.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Entity(name = "prds_project_user_role")
@Getter
@Setter
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
Expand All @@ -44,8 +42,7 @@ public class ProjectUserRole {

@Embeddable
@Builder
@Getter
@Setter
@Data
@AllArgsConstructor
@NoArgsConstructor
public static class Id implements Serializable {
Expand Down

0 comments on commit 97fccfb

Please sign in to comment.