Skip to content

Commit fb903eb

Browse files
authored
Merge pull request #337 from EasyPost/remove_create_list
chore: remove create_list tracker endpoint function
2 parents c0b3e19 + 0f45367 commit fb903eb

File tree

8 files changed

+25
-166
lines changed

8 files changed

+25
-166
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
1414
javaversion: ["8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22"]
1515
steps:
16-
- uses: actions/checkout@v3
17-
- name: Set up JDK for compilation
18-
uses: actions/setup-java@v3
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-java@v4
1918
with:
2019
distribution: "zulu"
2120
java-version: "22" # Always use the latest JDK for building
@@ -31,18 +30,17 @@ jobs:
3130
- name: Build Library
3231
run: make build
3332
- name: Set up Java ${{ matrix.javaversion }}
34-
uses: actions/setup-java@v3
33+
uses: actions/setup-java@v4
3534
with:
3635
distribution: "zulu"
3736
java-version: ${{ matrix.javaversion }}
3837
- name: Run test with Java ${{ matrix.javaversion }}
3938
run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make test
4039
coverage:
41-
runs-on: ubuntu-20.04
40+
runs-on: ubuntu-latest
4241
steps:
43-
- uses: actions/checkout@v3
44-
- name: Set up JDK for compilation
45-
uses: actions/setup-java@v3
42+
- uses: actions/checkout@v4
43+
- uses: actions/setup-java@v4
4644
with:
4745
distribution: "zulu"
4846
java-version: "22" # Always use the latest JDK for building
@@ -73,9 +71,13 @@ jobs:
7371
github-token: ${{ secrets.GITHUB_TOKEN }}
7472
path-to-lcov: "./coverage.lcov"
7573
lint:
76-
runs-on: ubuntu-20.04
74+
runs-on: ubuntu-latest
7775
steps:
78-
- uses: actions/checkout@v3
76+
- uses: actions/checkout@v4
77+
- uses: actions/setup-java@v4
78+
with:
79+
distribution: "zulu"
80+
java-version: "22" # Always use the latest JDK for building
7981
- name: Install checkstyle and style guide
8082
run: make install-checkstyle
8183
- name: Load Maven dependencies and CVE database cache
@@ -94,11 +96,10 @@ jobs:
9496
path: ${{github.workspace}}/target/dependency-check-report.html
9597
docs:
9698
if: github.ref == 'refs/heads/master'
97-
runs-on: ubuntu-20.04
99+
runs-on: ubuntu-latest
98100
steps:
99-
- uses: actions/checkout@v3
100-
- name: Set up JDK for compilation
101-
uses: actions/setup-java@v3
101+
- uses: actions/checkout@v4
102+
- uses: actions/setup-java@v4
102103
with:
103104
distribution: "zulu"
104105
java-version: "22" # Always use the latest JDK for building

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## Next Release
4+
5+
- Removes the deprecated `create_list` tracker endpoint function as it is no longer available via API
6+
37
## v7.4.3 (2024-09-16)
48

59
- Remove the custom DateDeserializer that contained a parsing issue. This change closes the related GitHub issue [#333](https://github.com/EasyPost/easypost-java/issues/333)

dependency-check-suppressions.xml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,7 @@
55
Below vulnerabilities are from outdated Protocol Buffers which is the dependency of Error Prone.
66
This will not affect our code.
77
-->
8-
<vulnerabilityName>CVE-2022-3171</vulnerabilityName>
9-
<vulnerabilityName>CVE-2022-3509</vulnerabilityName>
10-
<vulnerabilityName>CVE-2022-3510</vulnerabilityName>
118
<vulnerabilityName>CVE-2023-2976</vulnerabilityName>
12-
<!--
13-
Vulnerability in the Dependency Check itself, used during testing.
14-
Will not affect end-users.
15-
Ref: https://github.com/jeremylong/DependencyCheck/issues/5943 -->
16-
<vulnerabilityName>CVE-2023-4759</vulnerabilityName>
9+
<vulnerabilityName>CVE-2024-7254</vulnerabilityName>
1710
</suppress>
1811
</suppressions>

pom.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<dependency>
5252
<groupId>com.google.errorprone</groupId>
5353
<artifactId>error_prone_core</artifactId>
54-
<version>2.19.0</version>
54+
<version>2.32.0</version>
5555
<scope>provided</scope>
5656
</dependency>
5757
<dependency>
@@ -225,14 +225,12 @@
225225
<plugin>
226226
<groupId>org.apache.maven.plugins</groupId>
227227
<artifactId>maven-compiler-plugin</artifactId>
228-
<version>3.11.0</version>
228+
<version>3.13.0</version>
229229
<configuration>
230230
<release>8</release>
231231
<encoding>UTF-8</encoding>
232232
<fork>true</fork>
233233
<compilerArgs>
234-
<arg>-XDcompilePolicy=simple</arg>
235-
<arg>-Xplugin:ErrorProne</arg>
236234
<arg>-XDcompilePolicy=simple</arg>
237235
<arg>-Xplugin:ErrorProne</arg>
238236
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
@@ -250,7 +248,7 @@
250248
<path>
251249
<groupId>com.google.errorprone</groupId>
252250
<artifactId>error_prone_core</artifactId>
253-
<version>2.17.0</version>
251+
<version>2.32.0</version>
254252
</path>
255253
<path>
256254
<groupId>org.projectlombok</groupId>

src/main/java/com/easypost/service/AddressService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public Address retrieve(final String id) throws EasyPostException {
6868
*
6969
* @param params Map of parameters.
7070
* @return AddressCollection object.
71-
* @throws APIException when the request fails.
71+
* @throws EasyPostException when the request fails.
7272
*/
7373
public AddressCollection all(final Map<String, Object> params) throws EasyPostException {
7474
String endpoint = "addresses";

src/main/java/com/easypost/service/TrackerService.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,4 @@ public TrackerCollection apply(Map<String, Object> parameters) {
100100
}
101101
}, collection.getTrackers(), pageSize);
102102
}
103-
104-
/**
105-
* Create a list of Trackers.
106-
*
107-
* @param params Map of parameters used to create the Trackers.
108-
* @throws EasyPostException when the request fails.
109-
* @deprecated Use the create function instead. createList will be removed in a future release.
110-
*/
111-
@Deprecated public void createList(final Map<String, Object> params) throws EasyPostException {
112-
Map<String, Object> newParams = new HashMap<String, Object>();
113-
newParams.put("trackers", params);
114-
115-
String endpoint = "trackers/create_list";
116-
117-
Requestor.request(RequestMethod.POST, endpoint, newParams, Object.class, client);
118-
}
119103
}

src/test/cassettes/tracker/create_list.json

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/test/java/com/easypost/TrackerTest.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import java.util.List;
1414
import java.util.Map;
1515

16-
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
1716
import static org.junit.jupiter.api.Assertions.assertEquals;
1817
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
1918
import static org.junit.jupiter.api.Assertions.assertNotEquals;
@@ -208,30 +207,4 @@ public Map<String, Object> getNextPageParams() throws EndOfPaginationError {
208207
assertEquals(trackingCode, nextPageParams.get("tracking_code"));
209208
assertEquals(carrier, nextPageParams.get("carrier"));
210209
}
211-
212-
/**
213-
* Test creating a list of trackers.
214-
*
215-
* @throws EasyPostException when the request fails.
216-
*/
217-
@Test
218-
public void testCreateList() throws EasyPostException {
219-
vcr.setUpTest("create_list");
220-
221-
Map<String, Object> params = new HashMap<>();
222-
String[] trackingCodes = new String[] {
223-
"EZ1000000001",
224-
"EZ1000000002",
225-
"EZ1000000003"
226-
};
227-
228-
for (int i = 0; i < trackingCodes.length; i++) {
229-
Map<String, Object> tracker = new HashMap<>();
230-
231-
tracker.put("tracking_code", trackingCodes[i]);
232-
params.put(String.valueOf(i), tracker);
233-
}
234-
235-
assertDoesNotThrow(() -> vcr.client.tracker.createList(params));
236-
}
237210
}

0 commit comments

Comments
 (0)