Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion marklogic-client-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ dependencies {
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
implementation 'io.github.rburgst:okhttp-digest:2.7'

implementation 'com.sun.mail:javax.mail:1.6.2'
// https://eclipse-ee4j.github.io/angus-mail/ recommends using these two separate dependencies.
implementation "jakarta.mail:jakarta.mail-api:2.1.3"
implementation "org.eclipse.angus:angus-mail:2.0.3"

implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'
implementation 'org.slf4j:slf4j-api:1.7.36'
implementation 'com.fasterxml.jackson.core:jackson-core:2.15.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.mail.BodyPart;
import javax.mail.Header;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMultipart;
import javax.mail.util.ByteArrayDataSource;
import jakarta.mail.BodyPart;
import jakarta.mail.Header;
import jakarta.mail.MessagingException;
import jakarta.mail.internet.MimeMultipart;
import jakarta.mail.util.ByteArrayDataSource;
import javax.net.ssl.*;
import jakarta.xml.bind.DatatypeConverter;
import java.io.ByteArrayInputStream;
Expand Down Expand Up @@ -98,6 +98,14 @@

@SuppressWarnings({ "unchecked", "rawtypes" })
public class OkHttpServices implements RESTServices {

static {
// Added in 7.0.0. Instructs jakarta-mail to allow UTF-8 in header names in multipart responses.
if (System.getProperty("mail.mime.allowutf8") == null) {
System.setProperty("mail.mime.allowutf8", "true");
}
}

static final private Logger logger = LoggerFactory.getLogger(OkHttpServices.class);

static final public String OKHTTP_LOGGINGINTERCEPTOR_LEVEL = "com.marklogic.client.okhttp.httplogginginterceptor.level";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.marklogic.client.document.DocumentRecord;
import com.marklogic.client.io.StringHandle;
import com.marklogic.client.test.Common;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -17,7 +16,6 @@
class ReadDocumentPageTest {

@Test
@Disabled("For MLE-15748. Using to refactor multipart reading first.")
void test() {
Common.deleteUrisWithPattern("/aaa-page/*");

Expand Down