diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 0cebab8c..6d479f45 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -29,7 +29,7 @@ artifactId = "mimepull" version = "1.9.11" [[platform.java17.dependency]] -path = "./lib/jakarta.activation-2.0.1.jar" -groupId = "com.sun.activation" -artifactId = "jakarta.activation" +path = "./lib/jakarta.activation-api-2.0.1.jar" +groupId = "jakarta.activation" +artifactId = "jakarta.activation-api" version = "2.0.1" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 388ce34b..66df39ea 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.8.0-20230726-145300-b2bdf796" +distribution-version = "2201.8.0-20230830-220400-8a7556d8" [[package]] org = "ballerina" diff --git a/ballerina/build.gradle b/ballerina/build.gradle index 11b1ca47..89506e99 100644 --- a/ballerina/build.gradle +++ b/ballerina/build.gradle @@ -70,7 +70,7 @@ dependencies { externalJars(group: 'org.jvnet.mimepull', name: 'mimepull', version: "${mimepullVersion}") { transitive = false } - externalJars(group: 'com.sun.activation', name: 'jakarta.activation', version: "${jakartaActivationVersion}") { + externalJars(group: 'jakarta.activation', name: 'jakarta.activation-api', version: "${jakartaActivationVersion}") { transitive = false } } diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index 9a3e6206..7c1b1d4a 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -29,7 +29,7 @@ artifactId = "mimepull" version = "@mimepull.version@" [[platform.java17.dependency]] -path = "./lib/jakarta.activation-@jakarta.activation.version@.jar" -groupId = "com.sun.activation" -artifactId = "jakarta.activation" +path = "./lib/jakarta.activation-api-@jakarta.activation.version@.jar" +groupId = "jakarta.activation" +artifactId = "jakarta.activation-api" version = "@jakarta.activation.version@" diff --git a/changelog.md b/changelog.md index 3e58ced7..4a42b36b 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,12 @@ This file contains all the notable changes done to the Ballerina MIME package th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +## Changed + +- [Change `com.sun.activation:jakarta.activation` to `jakarta.activation:jakarta.activation-api`](https://github.com/ballerina-platform/ballerina-standard-library/issues/4789) + ## [2.6.0] - 2022-02-20 ## Fixed diff --git a/native/src/main/java/io/ballerina/stdlib/mime/nativeimpl/MimeDataSourceBuilder.java b/native/src/main/java/io/ballerina/stdlib/mime/nativeimpl/MimeDataSourceBuilder.java index e36b8791..ffc91070 100644 --- a/native/src/main/java/io/ballerina/stdlib/mime/nativeimpl/MimeDataSourceBuilder.java +++ b/native/src/main/java/io/ballerina/stdlib/mime/nativeimpl/MimeDataSourceBuilder.java @@ -75,10 +75,10 @@ protected static Object getAlreadyBuiltByteArray(BObject entityObj, Object messa String charsetValue = MimeUtil.getContentTypeParamValue(contentTypeValue, CHARSET); if (isNotNullAndEmpty(charsetValue)) { return ValueCreator.createArrayValue( - StringUtils.getStringValue(messageDataSource, null).getBytes(charsetValue)); + StringUtils.getStringValue(messageDataSource).getBytes(charsetValue)); } return ValueCreator.createArrayValue( - StringUtils.getStringValue(messageDataSource, null).getBytes(Charset.defaultCharset())); + StringUtils.getStringValue(messageDataSource).getBytes(Charset.defaultCharset())); } return ValueCreator.createArrayValue(new byte[0]); } diff --git a/test-utils/build.gradle b/test-utils/build.gradle index 06e398d0..58f0a9fa 100644 --- a/test-utils/build.gradle +++ b/test-utils/build.gradle @@ -40,7 +40,7 @@ dependencies { implementation group: 'io.ballerina.stdlib', name: 'io-native', version: "${stdlibIoVersion}" implementation group: 'org.jvnet.mimepull', name: 'mimepull', version: "${mimepullVersion}" - implementation group: 'com.sun.activation', name: 'jakarta.activation', version: "${jakartaActivationVersion}" + implementation group: 'jakarta.activation', name: 'jakarta.activation-api', version: "${jakartaActivationVersion}" implementation group: 'org.slf4j', name: 'slf4j-jdk14', version: "${slf4jVersion}" }