Showing posts from May, 2017

Kotlin and Java EE Part Three - Making it Idiomatic

Kotlin and Java EE Part Three - Making it Idiomatic Converting Java EE application to Kotlin started with the battle with the framework, where we successfully outmaneuvered all the obstacles presented by sometimes archaic standards. In the process, the code was enriched with modern, Kotlin-specific constructs making it concise and safer. If you did not read the previous two parts of the series, you can find them here: Kotlin and Java EE: Part One - From Java to Kotlin Kotlin and Java EE: Part Two - Having Fun with Plugins After briefly revisiting already made changes, I will add some final touches. What We Already Did Many constructs from the previous two parts are already idiomatic Kotlin. Let’s take a look at set definition: private final Set < Class < ? >> classes = new HashSet < > ( Arrays . asList ( KittenRestService . class ) ) ; As Java does not support a simple construction of Set and some other collections from a li