Deserializing a list of ints with Spring WebClient

I’m trying to communicate with a Rest service that returns a simple JSON array of ints, e.g. [1, 2, 3, 4] I have the following code to make the call via WebClient: client.get() .uri(“/…

Android FATAL EXCEPTION at android.arch.lifecycle on Kotlin lang

i just try to convert my old android project in java to Kotlin and also add google Android Architecture Components to my project : // LifeCycle Google Lib compile “android.arch.lifecycle:runtime:1.0….

Convert indefinitely running Runnable from java to kotlin

I have some code like this in java that monitors a certain file: private Handler mHandler = new Handler(); private final Runnable monitor = new Runnable() { public void run() { // Do my …

What is the `it` in Kotlin lambda body?

For example in these two following codes: File(“./file1.txt”).forEachLine { println(it) } and File(“somefile.txt”).bufferedWriter().use { out -> history.forEach { out.write(“${it.key}…

Kotlin: Cannot import-on-demand from object

I am trying to make a library where you can call functions of an object through “static imports” (import-on-demand in Kotlin). Unfortunately Kotlin seems to have a limitation as seen below. Why is …

Android Get Current timestamp?

I want to get the current timestamp like that : 1320917972 int time = (int) (System.currentTimeMillis()); Timestamp tsTemp = new Timestamp(time); String ts = tsTemp.toString();