Skip to content

Commit

Permalink
Optimise code (#201)
Browse files Browse the repository at this point in the history
* Optimise code

* Optimise code

* Optimise code
  • Loading branch information
sabahirfan authored Feb 19, 2024
1 parent c943f02 commit 0274b5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ jacocoTestReport {

static String[] jacocoExclusionArray(ArrayList<String> exclusions)
{
final def lst = new ArrayList<String>();
final def lst = new ArrayList<String>()

exclusions.stream().forEach {it.endsWith(".java") ? lst.add(it.replace(".java", ".class")) : lst.add(it)}

return lst.toArray();
return lst.toArray()
}

project.tasks['sonarqube'].dependsOn jacocoTestReport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;

Expand All @@ -31,9 +32,7 @@ public final List<Specification<E>> specificationList(List<Optional<Specificatio
@SafeVarargs
public final List<Optional<Specification<E>>> combine(List<Optional<Specification<E>>> specsList,
Optional<Specification<E>>... optionalSpecs) {
for (Optional<Specification<E>> spec: optionalSpecs) {
specsList.add(spec);
}
Collections.addAll(specsList, optionalSpecs);
return specsList;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public static AccountDetailsDto buildAccountDetailsDto() {
.postCode("W1 1AA")
.dob(LocalDate.of(1979,12,12))
.detailsChanged(LocalDate.of(2012, 1,1))
.lastCourtAppAndCourtCode(LocalDate.of(2012, 1,1).toString()
.lastCourtAppAndCourtCode(LocalDate.of(2012, 1,1)
+ " " + 1212)
.lastMovement(LocalDate.of(2012, 1,1))
.commentField(List.of("Comment1"))
Expand Down

0 comments on commit 0274b5b

Please sign in to comment.