Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/remove multi faceted abstraction smell #317

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MeetMaratha
Copy link

In this PR I tried to solve multi-faceted abstraction smell present in the DirectoryScanner class. This class was performing multiple tasks, so I have extracted them into separate classes with there being an abstraction for processing file such that new ways of processing file can be added easily in future by extending FileProcessor class and adding logic for the new processing function.

I built the program using command gradle installDist, and it built completely without any issues and I was able to run the GUI without any errors.

If you need any further explanation before merging the PR, please let me know.

…of DirectoryScanner class into FileProcessor, FileTypeDetector and DirectorScanner class
…of DirectoryScanner class into FileProcessor, FileTypeDetector and DirectorScanner class. Also performed Conditional Polymorphism to make it possible to add new FileProcessors in future
@clausnagel
Copy link
Member

There is currently no plan for adding new file formats, so an extensible file processing logic is not needed. What is the use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants