syedamisbahh commented on PR #2171:
URL: https://github.com/apache/tika/pull/2171#issuecomment-2764332331

   I have also committed the below changes into the files:
   
   4. Extract Class: Inner class RankedService extracted into its own top-level 
class RankedService.java to adhere to the Single Responsibility Principle, 
reducing complexity in ServiceLoader.java.
   
   5. Move Method: Method collectServiceClassNames() moved from 
ServiceLoader.java to a new utility class ServiceResourceUtils.java, enhancing 
separation of concerns and enabling independent testing and reuse.
   
   6. Pull-up Method: Generic method getDetectors() moved from DefaultDetector 
to superclass CompositeDetector, centralizing detector aggregation logic and 
improving code reuse.
   
   7. Introduce Polymorphism: Replaced repetitive conditional checks in 
TikaConfig.java with a polymorphic strategy pattern utilizing a strategy map, 
simplifying the logic and facilitating easier future expansions.


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

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

Reply via email to