Added checkstyle

This commit is contained in:
Marcin Grzejszczak
2019-02-03 19:27:07 +01:00
parent 4d0acf120c
commit 60f1e21d03
249 changed files with 7450 additions and 5857 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2018 the original author or authors.
* Copyright 2015-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,23 +35,22 @@ import org.springframework.context.annotation.Bean;
/**
* Spring Boot Application that has tasks enabled.
*/
@EnableTask
@SpringBootApplication
@EnableConfigurationProperties({ TimestampTaskProperties.class })
@EnableConfigurationProperties({TimestampTaskProperties.class})
public class TaskApplication {
private static final Log logger = LogFactory.getLog(TaskApplication.class);
public static void main(String[] args) {
SpringApplication.run(TaskApplication.class, args);
}
@Bean
public TimestampTask timeStampTask() {
return new TimestampTask();
}
public static void main(String[] args) {
SpringApplication.run(TaskApplication.class, args);
}
/**
* A commandline runner that prints a timestamp.
*/
@@ -62,7 +61,7 @@ public class TaskApplication {
@Override
public void run(String... strings) throws Exception {
DateFormat dateFormat = new SimpleDateFormat(config.getFormat());
DateFormat dateFormat = new SimpleDateFormat(this.config.getFormat());
logger.info(dateFormat.format(new Date()));
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,8 +31,8 @@ public class TimestampTaskProperties {
private String format = "yyyy-MM-dd HH:mm:ss.SSS";
public String getFormat() {
Assert.hasText(format, "format must not be empty nor null");
return format;
Assert.hasText(this.format, "format must not be empty nor null");
return this.format;
}
public void setFormat(String format) {