You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by GitBox <gi...@apache.org> on 2022/09/06 13:03:35 UTC

[GitHub] [syncope] ilgrosso opened a new pull request, #374: Task: one table per class + Preferring JSON arrays to @ElementCollection

ilgrosso opened a new pull request, #374:
URL: https://github.com/apache/syncope/pull/374

   JPA improvements:
   
   1. using one table per class for tasks, e.g. `PropagationTask`, `PullTask`, `PushTask`, `NotificationTask`, `SchedTask` instead of single `Task`; this also implies different tables for executions: `PropagationTaskExec`, etc.
   2. wherever possible, replace `@ElementCollection` with JSON arrays stored as `@Lob`
   
   Overall, these should be reducing the number and size of joined queries.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@syncope.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [syncope] ilgrosso merged pull request #374: Task: one table per class + Preferring JSON arrays to @ElementCollection

Posted by GitBox <gi...@apache.org>.
ilgrosso merged PR #374:
URL: https://github.com/apache/syncope/pull/374


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@syncope.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [syncope] github-code-scanning[bot] commented on a diff in pull request #374: Task: one table per class + Preferring JSON arrays to @ElementCollection

Posted by GitBox <gi...@apache.org>.
github-code-scanning[bot] commented on code in PR #374:
URL: https://github.com/apache/syncope/pull/374#discussion_r964871164


##########
core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/ProvisioningTaskValidator.java:
##########
@@ -22,19 +22,13 @@
 import org.apache.syncope.common.lib.types.EntityViolationType;
 import org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask;
 
-public class ProvisioningTaskValidator extends AbstractValidator<ProvisioningTaskCheck, ProvisioningTask> {
+public class ProvisioningTaskValidator extends AbstractValidator<ProvisioningTaskCheck, ProvisioningTask<?>> {
 
-    private final SchedTaskValidator schedV;
-
-    public ProvisioningTaskValidator() {
-        super();
-
-        schedV = new SchedTaskValidator();
-    }
+    private final SchedTaskValidator schedTaskValidator = new SchedTaskValidator();
 
     @Override
-    public boolean isValid(final ProvisioningTask task, final ConstraintValidatorContext context) {
-        boolean isValid = schedV.isValid(task, context);
+    public boolean isValid(final ProvisioningTask<?> task, final ConstraintValidatorContext context) {

Review Comment:
   ## Log Injection
   
   This user-provided value flows to a [log entry](1).
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1156)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@syncope.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [syncope] github-code-scanning[bot] commented on a diff in pull request #374: Task: one table per class + Preferring JSON arrays to @ElementCollection

Posted by GitBox <gi...@apache.org>.
github-code-scanning[bot] commented on code in PR #374:
URL: https://github.com/apache/syncope/pull/374#discussion_r963705548


##########
core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/ProvisioningTaskValidator.java:
##########
@@ -34,7 +35,9 @@
 
     @Override
     public boolean isValid(final ProvisioningTask task, final ConstraintValidatorContext context) {
-        boolean isValid = schedV.isValid(task, context);
+        boolean isValid = task instanceof SchedTask

Review Comment:
   ## Useless type test
   
   There is no need to test whether an instance of [ProvisioningTask<>](1) is also an instance of [SchedTask](2) - it always is.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1149)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@syncope.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [syncope] github-code-scanning[bot] commented on a diff in pull request #374: Task: one table per class + Preferring JSON arrays to @ElementCollection

Posted by GitBox <gi...@apache.org>.
github-code-scanning[bot] commented on code in PR #374:
URL: https://github.com/apache/syncope/pull/374#discussion_r963854270


##########
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationActions.java:
##########
@@ -67,7 +68,7 @@
      * @param execution execution result
      * @param error propagation error
      */
-    default void onError(PropagationTaskInfo taskInfo, TaskExec execution, Exception error) {
+    default void onError(PropagationTaskInfo taskInfo, TaskExec<PropagationTask> execution, Exception error) {

Review Comment:
   ## Useless parameter
   
   The parameter taskInfo is unused.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1153)



##########
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationActions.java:
##########
@@ -67,7 +68,7 @@
      * @param execution execution result
      * @param error propagation error
      */
-    default void onError(PropagationTaskInfo taskInfo, TaskExec execution, Exception error) {
+    default void onError(PropagationTaskInfo taskInfo, TaskExec<PropagationTask> execution, Exception error) {

Review Comment:
   ## Useless parameter
   
   The parameter execution is unused.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1154)



##########
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationActions.java:
##########
@@ -78,7 +79,7 @@
      * @param execution execution result
      * @param afterObj connector object read after propagation
      */
-    default void after(PropagationTaskInfo taskInfo, TaskExec execution, ConnectorObject afterObj) {
+    default void after(PropagationTaskInfo taskInfo, TaskExec<PropagationTask> execution, ConnectorObject afterObj) {

Review Comment:
   ## Useless parameter
   
   The parameter afterObj is unused.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1152)



##########
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationActions.java:
##########
@@ -78,7 +79,7 @@
      * @param execution execution result
      * @param afterObj connector object read after propagation
      */
-    default void after(PropagationTaskInfo taskInfo, TaskExec execution, ConnectorObject afterObj) {
+    default void after(PropagationTaskInfo taskInfo, TaskExec<PropagationTask> execution, ConnectorObject afterObj) {

Review Comment:
   ## Useless parameter
   
   The parameter taskInfo is unused.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1150)



##########
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationActions.java:
##########
@@ -67,7 +68,7 @@
      * @param execution execution result
      * @param error propagation error
      */
-    default void onError(PropagationTaskInfo taskInfo, TaskExec execution, Exception error) {
+    default void onError(PropagationTaskInfo taskInfo, TaskExec<PropagationTask> execution, Exception error) {

Review Comment:
   ## Useless parameter
   
   The parameter error is unused.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1155)



##########
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/propagation/PropagationActions.java:
##########
@@ -78,7 +79,7 @@
      * @param execution execution result
      * @param afterObj connector object read after propagation
      */
-    default void after(PropagationTaskInfo taskInfo, TaskExec execution, ConnectorObject afterObj) {
+    default void after(PropagationTaskInfo taskInfo, TaskExec<PropagationTask> execution, ConnectorObject afterObj) {

Review Comment:
   ## Useless parameter
   
   The parameter execution is unused.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1151)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@syncope.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org