The UndertowServletWebServerFactory class was refactored to address the identified code smells, specifically Long Method and High Coupling Intensity. The createManager method, which previously had a high number of lines of code, was divided into smaller, more focused methods, making it easier to read and maintain. The new methods created include configureResourceManager, configureWelcomeFiles, configureDefaultServlets, configureSessionManager, and configurePersistentSessions, each responsible for a specific part of the manager creation and configuration process. This separation of responsibilities helps to reduce complexity and excessive dependency, improving overall code understanding and reducing the risk of bugs. The refactoring resulted in cleaner and more modular code, aligned with best practices in software development.

This pull request is part of a requirement to obtain a grade in the "Software Quality" course of the Software Engineering program at the State University of Santa Catarina (UDESC).

Comment From: pivotal-cla

@NicolasWeber0901 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: wilkinsona

Thanks for the pull request. Unfortunately, I don't think these changes are an improvement. In particular the split between initialising the deployment and configuring it seems to be artificial as both methods are doing very similar things. This results in the code, for me, being harder to read. Thanks anyway.

Comment From: philwebb

Although I'm sure the intention is good, we've now had three pull-requests from folks obtaining a grade in the "Software Quality" course of the Software Engineering program at the State University of Santa Catarina (UDESC) (#41113, #41115, #41116).

Unfortunately reviewing pull-requests like these takes time and puts undue burden on the project maintainers. We kindly ask that UDESC reconsiders this practice and removes the requirement to contribute code to Spring Boot.

Thanks for your understanding.