ptuomola commented on a change in pull request #1975:
URL: https://github.com/apache/fineract/pull/1975#discussion_r756027492



##########
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TenantAwareBasicAuthenticationFilter.java
##########
@@ -59,33 +58,34 @@
  *
  * If multi-tenant and basic auth credentials are invalid, a http error 
response is returned.
  */
-@Service
+
 @Profile("basicauth")
 public class TenantAwareBasicAuthenticationFilter extends 
BasicAuthenticationFilter {
 
     private static boolean firstRequestProcessed = false;
     private static final Logger LOG = 
LoggerFactory.getLogger(TenantAwareBasicAuthenticationFilter.class);
 
-    private final BasicAuthTenantDetailsService basicAuthTenantDetailsService;
-    private final ToApiJsonSerializer<PlatformRequestLog> toApiJsonSerializer;
-    private final ConfigurationDomainService configurationDomainService;
-    private final CacheWritePlatformService cacheWritePlatformService;
-    private final NotificationReadPlatformService 
notificationReadPlatformService;
+    @Autowired

Review comment:
       I think this is a case of personal preferences... personally I like 
declaring the variables as @Autowired more than the "huge constructor with lots 
of parameters" approach, as it's simply less code: you just need to declare the 
variables, not repeat them three times (one declaration and twice in 
constructor). But you're right that it differs from how most of the classes are 
currently written...




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to