github-code-scanning[bot] commented on code in PR #532:
URL: https://github.com/apache/syncope/pull/532#discussion_r1356611648


##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ProvisioningContext.java:
##########
@@ -218,23 +215,14 @@
      */
     @Bean
     @Primary
-    public ThreadPoolTaskExecutor asyncConnectorFacadeExecutor(final 
ProvisioningProperties props) {
-        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
-        
executor.setCorePoolSize(props.getAsyncConnectorFacadeExecutor().getCorePoolSize());
-        
executor.setMaxPoolSize(props.getAsyncConnectorFacadeExecutor().getMaxPoolSize());
-        
executor.setQueueCapacity(props.getAsyncConnectorFacadeExecutor().getQueueCapacity());
-        
executor.setAwaitTerminationSeconds(props.getAsyncConnectorFacadeExecutor().getAwaitTerminationSeconds());
-        executor.setWaitForTasksToCompleteOnShutdown(true);
-        executor.setThreadNamePrefix("AsyncConnectorFacadeExecutor-");
-        executor.setRejectedExecutionHandler(new 
ThreadPoolExecutor.AbortPolicy());
-        executor.initialize();
-        return executor;
+    public AsyncTaskExecutor asyncConnectorFacadeExecutor(final 
ProvisioningProperties props) {

Review Comment:
   ## Useless parameter
   
   The parameter 'props' is never used.
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/1377)



##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ProvisioningContext.java:
##########
@@ -264,18 +251,8 @@
      * @return executor thread pool task executor
      */
     @Bean
-    public ThreadPoolTaskExecutor propagationTaskExecutorAsyncExecutor(final 
ProvisioningProperties props) {
-        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
-        
executor.setCorePoolSize(props.getPropagationTaskExecutorAsyncExecutor().getCorePoolSize());
-        
executor.setMaxPoolSize(props.getPropagationTaskExecutorAsyncExecutor().getMaxPoolSize());
-        
executor.setQueueCapacity(props.getPropagationTaskExecutorAsyncExecutor().getQueueCapacity());
-        executor.setWaitForTasksToCompleteOnShutdown(true);
-        executor.setAwaitTerminationSeconds(
-                
props.getPropagationTaskExecutorAsyncExecutor().getAwaitTerminationSeconds());
-        executor.setThreadNamePrefix("PropagationTaskExecutor-");
-        executor.setRejectedExecutionHandler(new 
ThreadPoolExecutor.AbortPolicy());
-        executor.initialize();
-        return executor;
+    public AsyncTaskExecutor propagationTaskExecutorAsyncExecutor(final 
ProvisioningProperties props) {

Review Comment:
   ## Useless parameter
   
   The parameter 'props' is never used.
   
   [Show more 
details](https://github.com/apache/syncope/security/code-scanning/1376)



-- 
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-unsubscr...@syncope.apache.org

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

Reply via email to