Refine code style
This commit is contained in:
@@ -55,8 +55,7 @@ class IpNeighbourMonitor private constructor() : Runnable {
|
|||||||
thread("$TAG-error") {
|
thread("$TAG-error") {
|
||||||
try {
|
try {
|
||||||
monitor.errorStream.bufferedReader().forEachLine { Log.e(TAG, it) }
|
monitor.errorStream.bufferedReader().forEachLine { Log.e(TAG, it) }
|
||||||
} catch (ignore: InterruptedIOException) {
|
} catch (_: InterruptedIOException) { }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
monitor.inputStream.bufferedReader().forEachLine {
|
monitor.inputStream.bufferedReader().forEachLine {
|
||||||
@@ -75,8 +74,7 @@ class IpNeighbourMonitor private constructor() : Runnable {
|
|||||||
val pool = Executors.newScheduledThreadPool(1)
|
val pool = Executors.newScheduledThreadPool(1)
|
||||||
pool.scheduleAtFixedRate(this, 1, 1, TimeUnit.SECONDS)
|
pool.scheduleAtFixedRate(this, 1, 1, TimeUnit.SECONDS)
|
||||||
this.pool = pool
|
this.pool = pool
|
||||||
} catch (ignore: InterruptedIOException) {
|
} catch (_: InterruptedIOException) { }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user