Skip to content

Commit

Permalink
chore(deps): Migrate EOL vulnerability of javax.mail to jakarta.mail (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajmahato-visa authored Jan 9, 2025
1 parent d3ac112 commit f6c86df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ project.ext.externalDependency = [
'annotationApi': 'javax.annotation:javax.annotation-api:1.3.2',
'jakartaAnnotationApi': 'jakarta.annotation:jakarta.annotation-api:3.0.0',
'classGraph': 'io.github.classgraph:classgraph:4.8.172',
'mustache': 'com.github.spullara.mustache.java:compiler:0.9.14'
'mustache': 'com.github.spullara.mustache.java:compiler:0.9.14',
'javaxMail': 'com.sun.mail:jakarta.mail:1.6.7'
]

allprojects {
Expand Down Expand Up @@ -374,6 +375,7 @@ configure(subprojects.findAll {! it.name.startsWith('spark-lineage')}) {
exclude group: "org.slf4j", module: "slf4j-nop"
exclude group: "org.slf4j", module: "slf4j-ext"
exclude group: "org.codehaus.jackson", module: "jackson-mapper-asl"
exclude group: "javax.mail", module: "mail"

resolutionStrategy.force externalDependency.antlr4Runtime
resolutionStrategy.force externalDependency.antlr4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@
import java.util.stream.StreamSupport;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.mail.MethodNotSupportedException;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.NotImplementedException;
import org.apache.http.MethodNotSupportedException;
import org.opensearch.core.common.util.CollectionUtils;

@Slf4j
Expand Down Expand Up @@ -1195,7 +1195,7 @@ public DataMap getRawAspect(
@Nonnull String aspect,
@Nonnull Long version)
throws RemoteInvocationException {
throw new MethodNotSupportedException();
throw new MethodNotSupportedException("Method not supported");
}

@Override
Expand Down
4 changes: 4 additions & 0 deletions metadata-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies {

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
runtimeOnly externalDependency.javaxMail

annotationProcessor externalDependency.lombok

Expand All @@ -40,6 +41,9 @@ dependencies {
implementation(externalDependency.log4jApi) {
because("previous versions are vulnerable to CVE-2021-45105")
}
implementation(externalDependency.javaxMail) {
because("previous versions are vulnerable")
}
}
implementation externalDependency.logbackClassic

Expand Down

0 comments on commit f6c86df

Please sign in to comment.