jabbink / PokemonGoBot

DEFUNCT - Bot that plays Pokemon Go
https://www.pogobot.club/
GNU General Public License v3.0
559 stars 232 forks source link

Replace lateinit binding of dependencies with constructor-injection #1292

Open geoand opened 8 years ago

geoand commented 8 years ago

It is considered good practice in Spring applications to use constructor injection whenever possible (the main reasons are better readability and testability of classes). Moreover, starting with 4.3.RC1 version of Spring, the @Autowired annotation is no longer needed when a class has a single constructor. Leveraging this fact along with Kotlin's very concise constructor syntax yields some nice readability improvements