Skip to content
Snippets Groups Projects
Commit af9f19b5 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Refactoring: use new instanceof

parent 7a4f4ca7
Branches
Tags
No related merge requests found
...@@ -48,16 +48,14 @@ public class RepeatingEndOptionConverter implements Converter<RepeatingEnd, Back ...@@ -48,16 +48,14 @@ public class RepeatingEndOptionConverter implements Converter<RepeatingEnd, Back
final BackupRepeatingEndOption_v4 repeatingEndOption = new BackupRepeatingEndOption_v4(); final BackupRepeatingEndOption_v4 repeatingEndOption = new BackupRepeatingEndOption_v4();
repeatingEndOption.setLocalizationKey(internalItem.getLocalizationKey()); repeatingEndOption.setLocalizationKey(internalItem.getLocalizationKey());
if(internalItem instanceof RepeatingEndDate) if(internalItem instanceof RepeatingEndDate repeatingEndDate)
{ {
RepeatingEndDate repeatingEndDate = (RepeatingEndDate) internalItem;
final DateTime endDate = (DateTime) repeatingEndDate.getValue(); final DateTime endDate = (DateTime) repeatingEndDate.getValue();
repeatingEndOption.setEndDate(endDate.toString(DateTimeFormat.forPattern("yyyy-MM-dd"))); repeatingEndOption.setEndDate(endDate.toString(DateTimeFormat.forPattern("yyyy-MM-dd")));
} }
if(internalItem instanceof RepeatingEndAfterXTimes) if(internalItem instanceof RepeatingEndAfterXTimes repeatingEndAfterXTimes)
{ {
RepeatingEndAfterXTimes repeatingEndAfterXTimes = (RepeatingEndAfterXTimes) internalItem;
repeatingEndOption.setTimes((int) repeatingEndAfterXTimes.getValue()); repeatingEndOption.setTimes((int) repeatingEndAfterXTimes.getValue());
} }
......
...@@ -9,6 +9,7 @@ import org.springframework.core.io.FileSystemResource; ...@@ -9,6 +9,7 @@ import org.springframework.core.io.FileSystemResource;
import java.nio.file.Path; import java.nio.file.Path;
@Configuration @Configuration
@SuppressWarnings("squid:S1118")
public class PropertiesConfiguration public class PropertiesConfiguration
{ {
@Bean @Bean
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment