From 07569b83e1e90eb3f7bdfe847f0bb4a1e3be64ca Mon Sep 17 00:00:00 2001 From: David Guler Date: Fri, 25 Nov 2022 12:39:10 +0100 Subject: [PATCH] fix: syntax errors --- .../ch/zhaw/gartenverwaltung/io/WeatherGradenTaskPlanner.java | 2 +- src/main/java/ch/zhaw/gartenverwaltung/io/WeatherService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/zhaw/gartenverwaltung/io/WeatherGradenTaskPlanner.java b/src/main/java/ch/zhaw/gartenverwaltung/io/WeatherGradenTaskPlanner.java index ead783f..1d19cd9 100644 --- a/src/main/java/ch/zhaw/gartenverwaltung/io/WeatherGradenTaskPlanner.java +++ b/src/main/java/ch/zhaw/gartenverwaltung/io/WeatherGradenTaskPlanner.java @@ -18,7 +18,7 @@ public class WeatherGradenTaskPlanner { } public void getWeatherEvents() throws IOException { - Enum actualWeather = weatherService.causeSevereWeather(0); + SevereWeather actualWeather = weatherService.causeSevereWeather(0); if (SevereWeather.HAIL.equals(actualWeather)) { createPreHail(); } else if (SevereWeather.FROST.equals(actualWeather)) { diff --git a/src/main/java/ch/zhaw/gartenverwaltung/io/WeatherService.java b/src/main/java/ch/zhaw/gartenverwaltung/io/WeatherService.java index fffe1bc..a82177c 100644 --- a/src/main/java/ch/zhaw/gartenverwaltung/io/WeatherService.java +++ b/src/main/java/ch/zhaw/gartenverwaltung/io/WeatherService.java @@ -2,7 +2,7 @@ package ch.zhaw.gartenverwaltung.io; public class WeatherService { - public Enum causeSevereWeather(int randomWeather){ + public SevereWeather causeSevereWeather(int randomWeather) { return switch (randomWeather) { case 1 -> SevereWeather.HAIL; case 2 -> SevereWeather.SNOW;