TSK-1572: automatically formatted code
This commit is contained in:
parent
66ef87aeef
commit
2a643bc298
|
@ -170,7 +170,8 @@ public class ComparableVersion implements Comparable<ComparableVersion> {
|
||||||
* java -jar ${maven.repo.local}/org/apache/maven/maven-artifact/
|
* java -jar ${maven.repo.local}/org/apache/maven/maven-artifact/
|
||||||
* ${maven.version}/maven-artifact-${maven.version}.jar "1.2.7" "1.2-SNAPSHOT"
|
* ${maven.version}/maven-artifact-${maven.version}.jar "1.2.7" "1.2-SNAPSHOT"
|
||||||
* </pre>
|
* </pre>
|
||||||
* command to command line. Result of given command will be something like this:
|
*
|
||||||
|
* <p>command to command line. Result of given command will be something like this:
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* Display parameters as parsed by Maven (in canonical form) and comparison result:
|
* Display parameters as parsed by Maven (in canonical form) and comparison result:
|
||||||
|
|
|
@ -17,8 +17,8 @@ class CollectionUtilTest {
|
||||||
List<Integer> listWith1000Entries =
|
List<Integer> listWith1000Entries =
|
||||||
IntStream.rangeClosed(1, 1000).boxed().collect(Collectors.toList());
|
IntStream.rangeClosed(1, 1000).boxed().collect(Collectors.toList());
|
||||||
assertThat(listWith1000Entries).hasSize(1000);
|
assertThat(listWith1000Entries).hasSize(1000);
|
||||||
Collection<List<Integer>> partitions = CollectionUtil
|
Collection<List<Integer>> partitions =
|
||||||
.partitionBasedOnSize(listWith1000Entries, 100);
|
CollectionUtil.partitionBasedOnSize(listWith1000Entries, 100);
|
||||||
assertThat(partitions).hasSize(10);
|
assertThat(partitions).hasSize(10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,8 @@ public class TaskHistoryEventController {
|
||||||
public TaskHistoryEventController(
|
public TaskHistoryEventController(
|
||||||
TaskanaEngineConfiguration taskanaEngineConfiguration,
|
TaskanaEngineConfiguration taskanaEngineConfiguration,
|
||||||
SimpleHistoryServiceImpl simpleHistoryServiceImpl,
|
SimpleHistoryServiceImpl simpleHistoryServiceImpl,
|
||||||
TaskHistoryEventRepresentationModelAssembler assembler) throws SQLException {
|
TaskHistoryEventRepresentationModelAssembler assembler)
|
||||||
|
throws SQLException {
|
||||||
|
|
||||||
this.simpleHistoryService = simpleHistoryServiceImpl;
|
this.simpleHistoryService = simpleHistoryServiceImpl;
|
||||||
this.simpleHistoryService.initialize(taskanaEngineConfiguration.buildTaskanaEngine());
|
this.simpleHistoryService.initialize(taskanaEngineConfiguration.buildTaskanaEngine());
|
||||||
|
|
|
@ -48,7 +48,6 @@ class TaskanaSecurityConfigAccTest {
|
||||||
|
|
||||||
setSecurityFlag(false);
|
setSecurityFlag(false);
|
||||||
|
|
||||||
|
|
||||||
assertThatCode(() -> createTaskanaEngine(false)).doesNotThrowAnyException();
|
assertThatCode(() -> createTaskanaEngine(false)).doesNotThrowAnyException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -350,8 +350,7 @@ class QueryWorkbasketAccTest extends AbstractAccTest {
|
||||||
|
|
||||||
assertThat(results)
|
assertThat(results)
|
||||||
.extracting(WorkbasketSummary::getId)
|
.extracting(WorkbasketSummary::getId)
|
||||||
.containsExactly(
|
.containsExactly("WBI:100000000000000000000000000000000001");
|
||||||
"WBI:100000000000000000000000000000000001");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@WithAccessId(user = "teamlead-1")
|
@WithAccessId(user = "teamlead-1")
|
||||||
|
|
|
@ -21,7 +21,6 @@ import pro.taskana.workbasket.rest.models.WorkbasketSummaryRepresentationModel;
|
||||||
@TaskanaSpringBootTest
|
@TaskanaSpringBootTest
|
||||||
public class AbstractAccTest {
|
public class AbstractAccTest {
|
||||||
|
|
||||||
|
|
||||||
protected RestHelper restHelper = new RestHelper(8080);
|
protected RestHelper restHelper = new RestHelper(8080);
|
||||||
|
|
||||||
protected TaskRepresentationModel getTaskResourceSample() {
|
protected TaskRepresentationModel getTaskResourceSample() {
|
||||||
|
|
|
@ -7,8 +7,8 @@ import java.util.Collection;
|
||||||
import pro.taskana.classification.rest.models.ClassificationDefinitionRepresentationModel;
|
import pro.taskana.classification.rest.models.ClassificationDefinitionRepresentationModel;
|
||||||
import pro.taskana.common.rest.models.CollectionRepresentationModel;
|
import pro.taskana.common.rest.models.CollectionRepresentationModel;
|
||||||
|
|
||||||
public class ClassificationDefinitionCollectionRepresentationModel extends
|
public class ClassificationDefinitionCollectionRepresentationModel
|
||||||
CollectionRepresentationModel<ClassificationDefinitionRepresentationModel> {
|
extends CollectionRepresentationModel<ClassificationDefinitionRepresentationModel> {
|
||||||
|
|
||||||
@ConstructorProperties("classifications")
|
@ConstructorProperties("classifications")
|
||||||
public ClassificationDefinitionCollectionRepresentationModel(
|
public ClassificationDefinitionCollectionRepresentationModel(
|
||||||
|
@ -16,9 +16,7 @@ public class ClassificationDefinitionCollectionRepresentationModel extends
|
||||||
super(content);
|
super(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** the embedded classification definitions. */
|
||||||
* the embedded classification definitions.
|
|
||||||
*/
|
|
||||||
@JsonProperty("classifications")
|
@JsonProperty("classifications")
|
||||||
@Override
|
@Override
|
||||||
public Collection<ClassificationDefinitionRepresentationModel> getContent() {
|
public Collection<ClassificationDefinitionRepresentationModel> getContent() {
|
||||||
|
|
|
@ -5,9 +5,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonUnwrapped;
|
import com.fasterxml.jackson.annotation.JsonUnwrapped;
|
||||||
import org.springframework.hateoas.RepresentationModel;
|
import org.springframework.hateoas.RepresentationModel;
|
||||||
|
|
||||||
|
public class ClassificationDefinitionRepresentationModel
|
||||||
public class ClassificationDefinitionRepresentationModel extends
|
extends RepresentationModel<ClassificationDefinitionRepresentationModel> {
|
||||||
RepresentationModel<ClassificationDefinitionRepresentationModel> {
|
|
||||||
|
|
||||||
@JsonIgnoreProperties("_links")
|
@JsonIgnoreProperties("_links")
|
||||||
@JsonUnwrapped
|
@JsonUnwrapped
|
||||||
|
|
|
@ -112,7 +112,6 @@ public class TaskQueryFilterParameter implements QueryParameter<TaskQuery, Void>
|
||||||
*/
|
*/
|
||||||
private final Instant[] due;
|
private final Instant[] due;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter since a given due timestamp.
|
* Filter since a given due timestamp.
|
||||||
*
|
*
|
||||||
|
|
|
@ -320,9 +320,10 @@ public class WorkbasketController {
|
||||||
throw new InvalidArgumentException("Can´t create something with NULL body-value.");
|
throw new InvalidArgumentException("Can´t create something with NULL body-value.");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<WorkbasketAccessItem> wbAccessItems = workbasketAccessItemRepModels.getContent().stream()
|
List<WorkbasketAccessItem> wbAccessItems =
|
||||||
.map(workbasketAccessItemRepresentationModelAssembler::toEntityModel)
|
workbasketAccessItemRepModels.getContent().stream()
|
||||||
.collect(Collectors.toList());
|
.map(workbasketAccessItemRepresentationModelAssembler::toEntityModel)
|
||||||
|
.collect(Collectors.toList());
|
||||||
workbasketService.setWorkbasketAccessItems(workbasketId, wbAccessItems);
|
workbasketService.setWorkbasketAccessItems(workbasketId, wbAccessItems);
|
||||||
List<WorkbasketAccessItem> updatedWbAccessItems =
|
List<WorkbasketAccessItem> updatedWbAccessItems =
|
||||||
workbasketService.getWorkbasketAccessItems(workbasketId);
|
workbasketService.getWorkbasketAccessItems(workbasketId);
|
||||||
|
|
|
@ -77,8 +77,8 @@ class ClassificationDefinitionControllerIntTest {
|
||||||
restHelper.toUrl(RestEndpoints.URL_CLASSIFICATION_DEFINITIONS) + "?domain=DOMAIN_B",
|
restHelper.toUrl(RestEndpoints.URL_CLASSIFICATION_DEFINITIONS) + "?domain=DOMAIN_B",
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
restHelper.defaultRequest(),
|
restHelper.defaultRequest(),
|
||||||
ParameterizedTypeReference
|
ParameterizedTypeReference.forType(
|
||||||
.forType(ClassificationDefinitionCollectionRepresentationModel.class));
|
ClassificationDefinitionCollectionRepresentationModel.class));
|
||||||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK);
|
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK);
|
||||||
assertThat(response.getBody()).isNotNull();
|
assertThat(response.getBody()).isNotNull();
|
||||||
assertThat(response.getBody().getContent())
|
assertThat(response.getBody().getContent())
|
||||||
|
@ -118,8 +118,8 @@ class ClassificationDefinitionControllerIntTest {
|
||||||
restHelper.toUrl(RestEndpoints.URL_CLASSIFICATION_DEFINITIONS) + "?domain=ADdfe",
|
restHelper.toUrl(RestEndpoints.URL_CLASSIFICATION_DEFINITIONS) + "?domain=ADdfe",
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
restHelper.defaultRequest(),
|
restHelper.defaultRequest(),
|
||||||
ParameterizedTypeReference
|
ParameterizedTypeReference.forType(
|
||||||
.forType(ClassificationDefinitionCollectionRepresentationModel.class));
|
ClassificationDefinitionCollectionRepresentationModel.class));
|
||||||
assertThat(response.getBody()).isNotNull();
|
assertThat(response.getBody()).isNotNull();
|
||||||
assertThat(response.getBody().getContent()).isEmpty();
|
assertThat(response.getBody().getContent()).isEmpty();
|
||||||
}
|
}
|
||||||
|
@ -309,12 +309,7 @@ class ClassificationDefinitionControllerIntTest {
|
||||||
|
|
||||||
ClassificationCollectionRepresentationModel clList =
|
ClassificationCollectionRepresentationModel clList =
|
||||||
new ClassificationCollectionRepresentationModel(
|
new ClassificationCollectionRepresentationModel(
|
||||||
List.of(
|
List.of(parent, child1, child2, grandChild1, grandChild2));
|
||||||
parent,
|
|
||||||
child1,
|
|
||||||
child2,
|
|
||||||
grandChild1,
|
|
||||||
grandChild2));
|
|
||||||
|
|
||||||
ResponseEntity<Void> response = importRequest(clList);
|
ResponseEntity<Void> response = importRequest(clList);
|
||||||
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT);
|
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT);
|
||||||
|
@ -419,7 +414,7 @@ class ClassificationDefinitionControllerIntTest {
|
||||||
LOGGER.debug("Start Import");
|
LOGGER.debug("Start Import");
|
||||||
File tmpFile = File.createTempFile("test", ".tmp");
|
File tmpFile = File.createTempFile("test", ".tmp");
|
||||||
try (FileOutputStream out = new FileOutputStream(tmpFile);
|
try (FileOutputStream out = new FileOutputStream(tmpFile);
|
||||||
OutputStreamWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);) {
|
OutputStreamWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8); ) {
|
||||||
mapper.writeValue(writer, clList);
|
mapper.writeValue(writer, clList);
|
||||||
}
|
}
|
||||||
MultiValueMap<String, FileSystemResource> body = new LinkedMultiValueMap<>();
|
MultiValueMap<String, FileSystemResource> body = new LinkedMultiValueMap<>();
|
||||||
|
|
Loading…
Reference in New Issue