File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed
main/java/com/marklogic/client/impl
test/java/com/marklogic/client/test/document Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,10 @@ dependencies {
2121 implementation ' com.squareup.okhttp3:logging-interceptor:4.12.0'
2222 implementation ' io.github.rburgst:okhttp-digest:2.7'
2323
24- implementation ' com.sun.mail:javax.mail:1.6.2'
24+ // https://eclipse-ee4j.github.io/angus-mail/ recommends using these two separate dependencies.
25+ implementation " jakarta.mail:jakarta.mail-api:2.1.3"
26+ implementation " org.eclipse.angus:angus-mail:2.0.3"
27+
2528 implementation ' javax.ws.rs:javax.ws.rs-api:2.1.1'
2629 implementation ' org.slf4j:slf4j-api:1.7.36'
2730 implementation ' com.fasterxml.jackson.core:jackson-core:2.15.3'
Original file line number Diff line number Diff line change 6464import org .slf4j .Logger ;
6565import org .slf4j .LoggerFactory ;
6666
67- import javax .mail .BodyPart ;
68- import javax .mail .Header ;
69- import javax .mail .MessagingException ;
70- import javax .mail .internet .MimeMultipart ;
71- import javax .mail .util .ByteArrayDataSource ;
67+ import jakarta .mail .BodyPart ;
68+ import jakarta .mail .Header ;
69+ import jakarta .mail .MessagingException ;
70+ import jakarta .mail .internet .MimeMultipart ;
71+ import jakarta .mail .util .ByteArrayDataSource ;
7272import javax .net .ssl .*;
7373import jakarta .xml .bind .DatatypeConverter ;
7474import java .io .ByteArrayInputStream ;
9898
9999@ SuppressWarnings ({ "unchecked" , "rawtypes" })
100100public class OkHttpServices implements RESTServices {
101+
102+ static {
103+ // Added in 7.0.0. Instructs jakarta-mail to allow UTF-8 in header names in multipart responses.
104+ if (System .getProperty ("mail.mime.allowutf8" ) == null ) {
105+ System .setProperty ("mail.mime.allowutf8" , "true" );
106+ }
107+ }
108+
101109 static final private Logger logger = LoggerFactory .getLogger (OkHttpServices .class );
102110
103111 static final public String OKHTTP_LOGGINGINTERCEPTOR_LEVEL = "com.marklogic.client.okhttp.httplogginginterceptor.level" ;
Original file line number Diff line number Diff line change 88import com .marklogic .client .document .DocumentRecord ;
99import com .marklogic .client .io .StringHandle ;
1010import com .marklogic .client .test .Common ;
11- import org .junit .jupiter .api .Disabled ;
1211import org .junit .jupiter .api .Test ;
1312
1413import static org .junit .jupiter .api .Assertions .assertEquals ;
1716class ReadDocumentPageTest {
1817
1918 @ Test
20- @ Disabled ("For MLE-15748. Using to refactor multipart reading first." )
2119 void test () {
2220 Common .deleteUrisWithPattern ("/aaa-page/*" );
2321
You can’t perform that action at this time.
0 commit comments