Fix typo and use lambda expression (#1306)

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
pull/1309/head
Fabian Wolter 2020-12-13 15:10:53 +01:00 committed by GitHub
parent c11533bc1e
commit 35388434d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 7 deletions

View File

@ -286,13 +286,11 @@ The following code block shows how to start a polling job in the initialize meth
```java
@Override
public void initialize() {
Runnable runnable = new Runnable() {
@Override
public void run() {
// execute some binding specific polling code
}
};
pollingJob = scheduler.scheduleAtFixedDelay(runnable, 0, 30, TimeUnit.SECONDS);
pollingJob = scheduler.scheduleWithFixedDelay(this::pollingCode, 0, 30, TimeUnit.SECONDS);
}
private void pollingCode() {
// execute some binding specific polling code
}
```