Closed andre-bisa closed 5 years ago
Hello Andrea, thank you for your feedback! I agree with you the EngineProperties class needs a heavy refactoring. Your proposal seems legit, I'd make loadProperties, saveProperties, loadDefaults static methods and change constructor visibility to private. PR are welcomed if you have time to implement this feature, work on dev branch and make a pull request. I'll evaluate your proposal!
I'm closing this issue since it has been fixed with the PR, thank you @andre-bisa
In my opinion the class it.unibo.arces.wot.sepa.engine.core.EngineProperties manages wrongly the default values. To be more precise the defaults are duplicated in the file, those are present both in "defaults" function and in every single getXXXX function. I think the best solution is to use one class to manage the current settings and load and save the class via JSON format using the GSON library. The structure I propose is: