Jabit icon indicating copy to clipboard operation
Jabit copied to clipboard

Port module 'demo' to Kotlin

Open ITroxxCH opened this issue 7 years ago • 0 comments

Since I don't really know the project very well I've kept the refactoring to a minimum. That said: I did implement some changes:

  • This is unrelated to the port but I had to fix the NetworkHandlerTest in order to build the project and run all tests.
  • The numbered options in the commandline application start now at 0 and not 1 as before since I used the forEachIndexed function.
  • I extended the CommandLine#nextLineTrimmed function so that it actually trims the next line.
  • Nullability was kept down as much as possible, except where the existing Java code dictated otherwise. However there are two places where I had to add non-null asserts (!!) to make everything compile. I've added TODOs to these places so that they can be easily tracked.
  • There is one test in SystemTest which seemed a bit strange to me. It works perfectly fine and was ported almost 1:1 from Java but I've still added a TODO since I think i might be worth to check whether the test is still valid or not.

ITroxxCH avatar Sep 02 '17 12:09 ITroxxCH