Skip to content

Commit 572848b

Browse files
committed
let's see if java 25 is happy
1 parent 9e59162 commit 572848b

17 files changed

Lines changed: 293 additions & 462 deletions

pom.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@
290290
</dependency>
291291
<dependency>
292292
<artifactId>jackson-databind</artifactId>
293-
<groupId>com.fasterxml.jackson.core</groupId>
294-
<version>${com.fasterxml.jackson.version}</version>
293+
<groupId>tools.jackson.core</groupId>
294+
<version>${tools.jackson.core.databind.version}</version>
295295
</dependency>
296296
<dependency>
297297
<artifactId>jackson-datatype-jsr310</artifactId>
@@ -366,7 +366,6 @@
366366
<artifactId>junit-pioneer</artifactId>
367367
<groupId>org.junit-pioneer</groupId>
368368
<scope>test</scope>
369-
<!-- version 2.0 is not compatible with java 8 -->
370369
<version>${org.junit.pioneer.version}</version>
371370
</dependency>
372371
<dependency>
@@ -418,8 +417,8 @@
418417
<!-- MINDEE VERSION GOES HERE -->
419418
<revision>5.0.0-alpha1</revision>
420419

421-
<com.fasterxml.jackson.version>2.15.4</com.fasterxml.jackson.version>
422-
<com.fasterxml.jackson.datatype.version>2.15.4</com.fasterxml.jackson.datatype.version>
420+
<tools.jackson.core.databind.version>3.1.1</tools.jackson.core.databind.version>
421+
<com.fasterxml.jackson.datatype.version>2.21.2</com.fasterxml.jackson.datatype.version>
423422
<com.squareup.okhttp3.version>4.12.0</com.squareup.okhttp3.version>
424423
<info.picocli.version>4.7.6</info.picocli.version>
425424
<maven.compiler.source>11</maven.compiler.source>
@@ -441,7 +440,7 @@
441440
<org.apache.pdfbox.version>3.0.5</org.apache.pdfbox.version>
442441
<org.junit.jupiter.version>5.8.2</org.junit.jupiter.version>
443442
<org.junit.pioneer.version>1.9.1</org.junit.pioneer.version>
444-
<org.junit.platform.version>1.8.2</org.junit.platform.version>
443+
<org.junit.platform.version>1.9.2</org.junit.platform.version>
445444
<org.hamcrest.version>2.2</org.hamcrest.version>
446445
<org.mapstruct.version>1.5.3.Final</org.mapstruct.version>
447446
<org.mockito.inline.version>4.11.0</org.mockito.inline.version>

src/main/java/com/mindee/v1/http/MindeeApiV1.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public abstract <DocT extends Inference> PredictResponse<DocT> predictPost(
3939
RequestParameters requestParameters
4040
) throws IOException;
4141

42+
/**
43+
* Execute a workflow.
44+
*/
4245
public abstract <DocT extends Inference> WorkflowResponse<DocT> executeWorkflowPost(
4346
Class<DocT> documentClass,
4447
String workflowId,

src/main/java/com/mindee/v2/MindeeClient.java

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.mindee.v2.parsing.ErrorResponse;
1111
import com.mindee.v2.parsing.JobResponse;
1212
import com.mindee.v2.product.extraction.ExtractionResponse;
13-
import com.mindee.v2.product.extraction.params.ExtractionParameters;
1413
import java.io.IOException;
1514

1615
/**
@@ -34,26 +33,6 @@ public MindeeClient(MindeeApiV2 mindeeApi) {
3433
this.mindeeApi = mindeeApi;
3534
}
3635

37-
/**
38-
* @deprecated use `enqueue` instead.
39-
*/
40-
public JobResponse enqueueInference(
41-
LocalInputSource inputSource,
42-
ExtractionParameters params
43-
) throws IOException {
44-
return enqueue(inputSource, params);
45-
}
46-
47-
/**
48-
* @deprecated use `enqueue` instead.
49-
*/
50-
public JobResponse enqueueInference(
51-
URLInputSource inputSource,
52-
ExtractionParameters params
53-
) throws IOException {
54-
return enqueue(inputSource, params);
55-
}
56-
5736
/**
5837
* Enqueue a document in the asynchronous queue.
5938
*
@@ -88,13 +67,6 @@ public JobResponse getJob(String jobId) {
8867
return mindeeApi.reqGetJob(jobId);
8968
}
9069

91-
/**
92-
* @deprecated use `getResult` instead.
93-
*/
94-
public ExtractionResponse getInference(String inferenceId) {
95-
return getResult(ExtractionResponse.class, inferenceId);
96-
}
97-
9870
/**
9971
* Get the result of an inference that was previously enqueued.
10072
* The inference will only be available after it has finished processing.
@@ -109,26 +81,6 @@ public <TResponse extends CommonResponse> TResponse getResult(
10981
return mindeeApi.reqGetResult(responseClass, inferenceId);
11082
}
11183

112-
/**
113-
* @deprecated use `enqueueAndGetResult` instead.
114-
*/
115-
public ExtractionResponse enqueueAndGetInference(
116-
LocalInputSource inputSource,
117-
ExtractionParameters options
118-
) throws IOException, InterruptedException {
119-
return enqueueAndGetResult(ExtractionResponse.class, inputSource, options);
120-
}
121-
122-
/**
123-
* @deprecated use `enqueueAndGetResult` instead.
124-
*/
125-
public ExtractionResponse enqueueAndGetInference(
126-
URLInputSource inputSource,
127-
ExtractionParameters options
128-
) throws IOException, InterruptedException {
129-
return enqueueAndGetResult(ExtractionResponse.class, inputSource, options);
130-
}
131-
13284
/**
13385
* Send a local file to an async queue, poll, and parse when complete.
13486
*

src/test/java/com/mindee/TestingUtilities.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ public static String getV1ResourcePathString(String filePath) {
2525
return getV1ResourcePath(filePath).toString();
2626
}
2727

28-
public static String readFileAsString(Path path) throws IOException {
29-
byte[] encoded = Files.readAllBytes(path);
30-
return new String(encoded);
31-
}
32-
3328
public static void assertStringEqualsFile(String expected, String filePath) throws IOException {
3429
String[] actualLines = expected.split(System.lineSeparator());
3530
List<String> expectedLines = Files.readAllLines(Paths.get(filePath));

0 commit comments

Comments
 (0)