Skip to content

Commit 9b51143

Browse files
authored
DSND-2876: Reformat project and optimise imports (#183)
* No logic changes
1 parent ab30c80 commit 9b51143

File tree

76 files changed

+1026
-921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1026
-921
lines changed

pom.xml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
<spring-boot-maven-plugin.version>3.4.4</spring-boot-maven-plugin.version>
2020
<maven.compiler.source>${java.version}</maven.compiler.source>
2121
<maven.compiler.target>${java.version}</maven.compiler.target>
22-
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
23-
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
24-
<maven-failsafe-plugin.version>3.5.2</maven-failsafe-plugin.version>
22+
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
23+
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
24+
<maven-failsafe-plugin.version>3.5.3</maven-failsafe-plugin.version>
2525
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
2626
<maven-build-helper-plugin.version>3.6.0</maven-build-helper-plugin.version>
2727
<jib-maven-plugin.version>3.4.4</jib-maven-plugin.version>
28-
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
29-
<commons.io.version>2.18.0</commons.io.version>
28+
<jacoco-maven-plugin.version>0.8.13</jacoco-maven-plugin.version>
29+
<commons.io.version>2.19.0</commons.io.version>
3030
<org.mapstruct.version>1.6.3</org.mapstruct.version>
3131

3232
<!-- Internal -->
@@ -36,7 +36,7 @@
3636
<api-security-java.version>2.0.8</api-security-java.version>
3737

3838
<!-- tests -->
39-
<io-cucumber.version>7.20.1</io-cucumber.version>
39+
<io-cucumber.version>7.22.0</io-cucumber.version>
4040
<skip.integration.tests>false</skip.integration.tests>
4141
<skip.unit.tests>false</skip.unit.tests>
4242

@@ -62,6 +62,14 @@
6262
</dependencyManagement>
6363

6464
<dependencies>
65+
<!-- Vulnerable deps start here-->
66+
<dependency>
67+
<groupId>org.springframework.security</groupId>
68+
<artifactId>spring-security-core</artifactId>
69+
<version>6.4.5</version>
70+
</dependency>
71+
<!-- Vulnerable deps end here-->
72+
6573
<dependency>
6674
<groupId>org.springframework.boot</groupId>
6775
<artifactId>spring-boot-starter-security</artifactId>

src/itest/java/uk/gov/companieshouse/pscdataapi/steps/PscDataSteps.java

Lines changed: 41 additions & 24 deletions
Large diffs are not rendered by default.

src/itest/resources/features/delete_psc.feature

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ Feature: Delete PSC
4343
| company_number |
4444
| 34777772 |
4545

46-
Scenario Outline: Delete PSC throws conflict exception if deltaAt is stale
47-
Given Psc data api service is running
48-
And a PSC "<data>" exists for "<company_number>" for Individual with "<existingDeltaAt>"
49-
When a DELETE request is sent for "<company_number>" with a stale "<deltaAt>"
50-
Then I should receive 409 status code
51-
And the CHS Kafka API is not invoked with a DELETE event
52-
53-
Examples:
54-
| data | company_number | existingDeltaAt | deltaAt |
55-
| get_individual | 34777772 | 20231020084745378999 | 20230724093435661593 |
46+
Scenario Outline: Delete PSC throws conflict exception if deltaAt is stale
47+
Given Psc data api service is running
48+
And a PSC "<data>" exists for "<company_number>" for Individual with "<existingDeltaAt>"
49+
When a DELETE request is sent for "<company_number>" with a stale "<deltaAt>"
50+
Then I should receive 409 status code
51+
And the CHS Kafka API is not invoked with a DELETE event
52+
53+
Examples:
54+
| data | company_number | existingDeltaAt | deltaAt |
55+
| get_individual | 34777772 | 20231020084745378999 | 20230724093435661593 |

src/itest/resources/features/get_legal_person_bo.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ Feature: Get Legal Person Beneficial Owner
2828
Then I should receive 404 status code
2929

3030
Examples:
31-
| company_number | notificationId |
31+
| company_number | notificationId |
3232
| 34777776 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZVV |

src/itest/resources/features/put_psc.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Feature: Process Psc Data Requests
88
And a record exists with id "<notificationId>"
99

1010
Examples:
11-
| data | notificationId |
12-
| put_psc_data | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ |
11+
| data | notificationId |
12+
| put_psc_data | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ |
1313

1414
Scenario Outline: Processing old psc data information
1515

@@ -20,5 +20,5 @@ Feature: Process Psc Data Requests
2020
And a record exists with id "<notificationId>" and delta_at "<deltaAt>"
2121

2222
Examples:
23-
| existingData | oldData | notificationId | deltaAt |
24-
| put_psc_data | put_psc_old_data | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ | 2023-11-20T08:47:45.378Z |
23+
| existingData | oldData | notificationId | deltaAt |
24+
| put_psc_data | put_psc_old_data | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ | 2023-11-20T08:47:45.378Z |

src/itest/resources/features/put_psc_errors.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Feature: Error and Retry Psc Data Requests
88
And the CHS Kafka API service is not invoked
99

1010
Examples:
11-
| data | companyNumber | notificationId |
12-
| put_psc_data | 34777772 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ |
11+
| data | companyNumber | notificationId |
12+
| put_psc_data | 34777772 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ |
1313

1414
Scenario Outline: Processing bad psc statement payload
1515
Given Psc data api service is running
@@ -28,5 +28,5 @@ Feature: Error and Retry Psc Data Requests
2828
Then I should receive 503 status code
2929

3030
Examples:
31-
| data | companyNumber | notificationId |
32-
| put_psc_data | 34777772 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ |
31+
| data | companyNumber | notificationId |
32+
| put_psc_data | 34777772 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ |
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
{
2-
"counts" : {
3-
"persons-with-significant-control" : {
4-
"active_statements_count" : 1.0,
5-
"total_count" : 2.0,
6-
"active_pscs_count" : 1.0,
7-
"ceased_pscs_count" : 0.0,
8-
"pscs_count" : 1.0,
9-
"statements_count" : 1.0,
10-
"withdrawn_statements_count" : 0.0
11-
},
12-
"appointments" : {
13-
"total_count" : 2.0,
14-
"active_secretaries_count" : 1.0,
15-
"resigned_count" : 0.0,
16-
"active_llp_members_count" : 0.0,
17-
"active_directors_count" : 1.0,
18-
"active_count" : 2.0
19-
}
2+
"counts": {
3+
"persons-with-significant-control": {
4+
"active_statements_count": 1.0,
5+
"total_count": 2.0,
6+
"active_pscs_count": 1.0,
7+
"ceased_pscs_count": 0.0,
8+
"pscs_count": 1.0,
9+
"statements_count": 1.0,
10+
"withdrawn_statements_count": 0.0
2011
},
21-
"registers" : {
22-
"directors" : {
23-
"register_moved_to" : "public-register",
24-
"moved_on" : "2020-11-09T14:52:14.000Z"
25-
},
26-
"usual_residential_address" : {
27-
"register_moved_to" : "public-register",
28-
"moved_on" : "2020-11-09T14:52:14.000Z"
29-
},
30-
"secretaries" : {
31-
"moved_on" : "2020-11-09T14:52:14.000Z",
32-
"register_moved_to" : "public-register"
33-
},
34-
"members" : {
35-
"register_moved_to" : "public-register",
36-
"moved_on" : "2020-11-09T14:52:14.000Z"
37-
},
38-
"persons_with_significant_control" : {
39-
"register_moved_to" : "public-register",
40-
"moved_on" : "2020-11-09T14:52:14.000Z"
41-
}
12+
"appointments": {
13+
"total_count": 2.0,
14+
"active_secretaries_count": 1.0,
15+
"resigned_count": 0.0,
16+
"active_llp_members_count": 0.0,
17+
"active_directors_count": 1.0,
18+
"active_count": 2.0
4219
}
43-
}
20+
},
21+
"registers": {
22+
"directors": {
23+
"register_moved_to": "public-register",
24+
"moved_on": "2020-11-09T14:52:14.000Z"
25+
},
26+
"usual_residential_address": {
27+
"register_moved_to": "public-register",
28+
"moved_on": "2020-11-09T14:52:14.000Z"
29+
},
30+
"secretaries": {
31+
"moved_on": "2020-11-09T14:52:14.000Z",
32+
"register_moved_to": "public-register"
33+
},
34+
"members": {
35+
"register_moved_to": "public-register",
36+
"moved_on": "2020-11-09T14:52:14.000Z"
37+
},
38+
"persons_with_significant_control": {
39+
"register_moved_to": "public-register",
40+
"moved_on": "2020-11-09T14:52:14.000Z"
41+
}
42+
}
43+
}

src/itest/resources/json/input/get_corporate_entity.json

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
22
"_id": "YfTs9WeeqpXTqf6dc6FZ4C0H0ZX",
33
"internal_data": {
4-
"created_at" : "2021-11-02T08:47:45",
5-
"updated_at" :"2021-09-14T10:30:16.000Z",
6-
"updated_by" :"CHIPS",
7-
"delta_at" : "2023-11-20T08:47:45.378Z"
4+
"created_at": "2021-11-02T08:47:45",
5+
"updated_at": "2021-09-14T10:30:16.000Z",
6+
"updated_by": "CHIPS",
7+
"delta_at": "2023-11-20T08:47:45.378Z"
88
},
99
"external_data": {
1010
"notification_id": "ZfTs9WeeqpXTqf6dc6FZ4C0H0ZX",
11-
"psc_id" : "ZfTs9WeeqpXTqf6dc6FZ4C0H0ZX",
11+
"psc_id": "ZfTs9WeeqpXTqf6dc6FZ4C0H0ZX",
1212
"sensitive_data": {
13-
"usual_residential_address" : {
14-
"address_line_1" : "ura_line1",
15-
"address_line_2" : "ura_line2",
16-
"care_of" : "ura_care_of",
17-
"country" : "United Kingdom",
18-
"locality" : "Cardiff",
19-
"po_box" : "ura_po",
20-
"postal_code" : "CF2 1B6",
21-
"premises" : "URA",
22-
"region" : "ura_region"
13+
"usual_residential_address": {
14+
"address_line_1": "ura_line1",
15+
"address_line_2": "ura_line2",
16+
"care_of": "ura_care_of",
17+
"country": "United Kingdom",
18+
"locality": "Cardiff",
19+
"po_box": "ura_po",
20+
"postal_code": "CF2 1B6",
21+
"premises": "URA",
22+
"region": "ura_region"
2323
},
2424
"residential_address_same_as_service_address": true,
2525
"date_of_birth": {
@@ -28,35 +28,37 @@
2828
"month": 10
2929
}
3030
},
31-
"data" : {
32-
"service_address" : {
33-
"address_line_1" : "sa_line1",
34-
"address_line_2" : "sa_line2",
35-
"care_of" : "sa_care_of",
36-
"country" : "United Kingdom",
37-
"locality" : "Cardiff",
38-
"po_box" : "sa_po",
39-
"postal_code" : "CF2 1B6",
40-
"premises" : "SA",
41-
"region" : "sa_region"
31+
"data": {
32+
"service_address": {
33+
"address_line_1": "sa_line1",
34+
"address_line_2": "sa_line2",
35+
"care_of": "sa_care_of",
36+
"country": "United Kingdom",
37+
"locality": "Cardiff",
38+
"po_box": "sa_po",
39+
"postal_code": "CF2 1B6",
40+
"premises": "SA",
41+
"region": "sa_region"
4242
},
4343
"natures_of_control": [
4444
"part-right-to-share-surplus-assets-75-to-100-percent"
4545
],
46-
"country_of_residence" : "United Kingdom",
47-
"links" : [{
48-
"self" : "/company/34777773/persons-with-significant-control/ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ"
49-
}],
50-
"nationality" : "British",
46+
"country_of_residence": "United Kingdom",
47+
"links": [
48+
{
49+
"self": "/company/34777773/persons-with-significant-control/ZfTs9WeeqpXTqf6dc6FZ4C0H0ZZ"
50+
}
51+
],
52+
"nationality": "British",
5153
"is_sanctioned": true,
52-
"kind" : "corporate-entity-person-with-significant-control",
54+
"kind": "corporate-entity-person-with-significant-control",
5355
"company_number": "34777773",
5456
"name": "string",
5557
"name_elements": {
56-
"title":"Mr.",
57-
"surname" : "JONES",
58-
"forename" : "PHIL",
59-
"middlename" : "tom"
58+
"title": "Mr.",
59+
"surname": "JONES",
60+
"forename": "PHIL",
61+
"middlename": "tom"
6062
}
6163
}
6264
}

0 commit comments

Comments
 (0)