TSK-1009: Fix more building errors after checkstyle changes

This commit is contained in:
Benjamin Eckstein 2020-01-07 15:56:05 +01:00 committed by Mustapha Zorgati
parent c4cd616e35
commit 85725a052c
15 changed files with 31 additions and 25 deletions

View File

@ -3,8 +3,8 @@ package pro.taskana.simplehistory.query;
import pro.taskana.QueryColumnName;
/**
* Enum containing the column names for {@see
* pro.taskana.simplehistory.impl.mappings.HistoryQueryMapper#queryHistoryColumnValues}.
* Enum containing the column names for
* {@link pro.taskana.simplehistory.impl.mappings.HistoryQueryMapper#queryHistoryColumnValues}.
*
* @author bv
*/

View File

@ -8,7 +8,6 @@ import static org.junit.Assert.fail;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.sql.SQLException;
import java.text.MessageFormat;
import java.time.LocalDateTime;
import java.util.Collections;
import javax.sql.DataSource;
@ -51,8 +50,10 @@ public class TaskHistoryEventControllerIntTest {
private static final Logger LOGGER =
LoggerFactory.getLogger(TaskHistoryEventControllerIntTest.class);
@Value("${taskana.schemaName:TASKANA}")
public String schemaName;
String server = "http://127.0.0.1:";
RestTemplate template;
@ -106,11 +107,10 @@ public class TaskHistoryEventControllerIntTest {
public void testGetSpecificTaskHistoryEvent() {
ResponseEntity<TaskHistoryEventListResource> response =
template.exchange(
MessageFormat.format(
"{0}{1}/api/v1/task-history-event?"
+ "business-process-id=BPI:01&sort-by=business-process-id&"
+ "order=asc&page-size=6&page=1",
server, port),
server
+ port
+ "/api/v1/task-history-event?business-process-id=BPI:01"
+ "&sort-by=business-process-id&order=asc&page-size=6&page=1",
HttpMethod.GET,
request,
new ParameterizedTypeReference<TaskHistoryEventListResource>() {});

View File

@ -1,7 +1,7 @@
package pro.taskana;
/**
* Enum containing the column names for @see {@link
* Enum containing the column names for {@link
* pro.taskana.mappings.QueryMapper#queryObjectReferenceColumnValues
* (pro.taskana.impl.ObjectReferenceQueryImpl)}.
*

View File

@ -11,7 +11,7 @@ import org.apache.ibatis.annotations.Update;
import pro.taskana.impl.ClassificationImpl;
/** This class is the mybatis mapping of classifications. */
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:indentation"})
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:Indentation"})
public interface ClassificationMapper {
@Select(

View File

@ -11,7 +11,7 @@ import org.apache.ibatis.annotations.Update;
import pro.taskana.ObjectReference;
/** This class is the mybatis mapping of ObjectReference. */
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:indentation"})
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:Indentation"})
public interface ObjectReferenceMapper {
@Select(

View File

@ -17,7 +17,7 @@ import pro.taskana.impl.WorkbasketQueryImpl;
import pro.taskana.impl.WorkbasketSummaryImpl;
/** This class provides a mapper for all queries. */
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:indentation"})
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:Indentation"})
public interface QueryMapper {
String OBJECTREFERENCEMAPPER_FINDBYID = "pro.taskana.mappings.ObjectReferenceMapper.findById";

View File

@ -18,7 +18,7 @@ import pro.taskana.impl.report.item.TimestampQueryItem;
import pro.taskana.report.Timestamp;
/** This class is the mybatis mapping of task monitoring. */
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:indentation"})
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:Indentation"})
public interface TaskMonitorMapper {
@Select(

View File

@ -25,6 +25,7 @@ import pro.taskana.sampledata.SampleDataGenerator;
@SpringBootApplication
@EnableScheduling
@ComponentScan(basePackages = "pro.taskana")
@SuppressWarnings("checkstyle:Indentation")
@Import({
TransactionalJobsConfiguration.class,
LdapConfiguration.class,

View File

@ -20,7 +20,7 @@ public class LdapCacheTestImpl implements LdapCache {
/**
* Dictionary is a {@link Map} collection that contains {@link AccessIdResource} as key (user) and
* {@link List<AccessIdResource>} as value (groups of which the user is a member) .
* {@link List} as value (groups of which the user is a member) .
*/
private static Map<AccessIdResource, List<AccessIdResource>> users;
@ -355,10 +355,10 @@ public class LdapCacheTestImpl implements LdapCache {
});
int groupNumber = 0;
List<AccessIdResource> group0 = new ArrayList<>(),
group1 = new ArrayList<>(),
group2 = new ArrayList<>(),
group3 = new ArrayList<>();
List<AccessIdResource> group0 = new ArrayList<>();
List<AccessIdResource> group1 = new ArrayList<>();
List<AccessIdResource> group2 = new ArrayList<>();
List<AccessIdResource> group3 = new ArrayList<>();
for (AccessIdResource group : groups) {
switch (groupNumber) {

View File

@ -11,6 +11,7 @@ import org.springframework.http.converter.json.MappingJackson2HttpMessageConvert
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/** The Web MVC Configuration. */
@Configuration
@EnableWebMvc

View File

@ -1,4 +1,5 @@
package pro.taskana.rest.models;
/** model for a user. */
public class User {

View File

@ -56,7 +56,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
public FilterRegistrationBean<CorsFilter> corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
config.addAllowedOrigin("*");
@ -96,11 +96,11 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/h2-console/**")
.permitAll();
} else {
AddLoginPageConfiguration(http);
addLoginPageConfiguration(http);
}
}
private void AddLoginPageConfiguration(HttpSecurity http) throws Exception {
private void addLoginPageConfiguration(HttpSecurity http) throws Exception {
http.authorizeRequests()
.anyRequest()
.fullyAuthenticated()

View File

@ -41,8 +41,8 @@ import pro.taskana.rest.resource.TaskResourceAssembler;
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class AsyncUpdateJobIntTest {
private static final String CLASSIFICATION_ID = "CLI:100000000000000000000000000000000003";
static RestTemplate template;
private static final String CLASSIFICATION_ID = "CLI:100000000000000000000000000000000003";
@Autowired ClassificationResourceAssembler classificationResourceAssembler;
@Autowired TaskResourceAssembler taskResourceAssembler;
@Autowired JobScheduler jobScheduler;
@ -57,8 +57,8 @@ class AsyncUpdateJobIntTest {
void testUpdateClassificationPrioServiceLevel() throws Exception {
// 1st step: get old classification :
Instant before = Instant.now();
ObjectMapper mapper = new ObjectMapper();
final Instant before = Instant.now();
final ObjectMapper mapper = new ObjectMapper();
ResponseEntity<ClassificationResource> response =
template.exchange(

View File

@ -25,6 +25,7 @@ import pro.taskana.sampledata.SampleDataGenerator;
@SpringBootApplication
@EnableScheduling
@ComponentScan(basePackages = "pro.taskana")
@SuppressWarnings("checkstyle:Indentation")
@Import({
TransactionalJobsConfiguration.class,
LdapConfiguration.class,

View File

@ -39,6 +39,7 @@ import pro.taskana.sampledata.SampleDataGenerator;
*/
@SpringBootApplication
@EnableScheduling
@SuppressWarnings("checkstyle:Indentation")
@Import({
TransactionalJobsConfiguration.class,
LdapConfiguration.class,
@ -90,7 +91,8 @@ public class TaskanaWildFlyApplication extends SpringBootServletInitializer {
return dataSource;
} catch (Exception e) {
LOGGER.error(
"Caught exception {} when attempting to start Taskana with Datasource from Jndi. Using default H2 datasource. ",
"Caught exception {} when attempting to start Taskana with Datasource "
+ "from Jndi. Using default H2 datasource. ",
e);
return dsProperties.initializeDataSourceBuilder().build();
}