Merge branch 'feature/device-service' of https://github.com/jazzm0/microservices-demo into feature/device-service
This commit is contained in:
commit
c396f23e9d
1 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,9 @@
|
|||
package com.sap.tamagotchi.model;
|
||||
|
||||
import static com.sap.tamagotchi.service.TamagotchiService.DEVICE_EVENT_PROCESSOR_SCHEDULE;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
@ -51,7 +53,7 @@ public class Owner {
|
|||
|
||||
Collection<Device> devices = tamagotchiService.getDevices();
|
||||
|
||||
if (devices != null) {
|
||||
if (devices != null && devices.iterator().hasNext()) {
|
||||
Device first = devices.iterator().next();
|
||||
Care care = new Care();
|
||||
care.setFeed(-100000);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue