Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORE-12539 - Update to latest version of jackson and mockito #3702

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
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ felixSecurityVersion=2.8.3
guavaVersion=30.1.1-jre
hibernateVersion=5.6.15.Final
hikariCpVersion=5.0.1
jacksonVersion=2.14.2
jacksonVersion=2.15.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably as a separate PR, but it would be worth upgrading SnakeYaml version to eliminate reported C1 vulnerability.

jaxbVersion = 2.3.1
jbossTransactionApiSpecVersion=1.1.1.Final
jetbrainsAnnotationsVersion=13.0
Expand Down Expand Up @@ -100,7 +100,7 @@ jimfsVersion = 1.2
junit5Version=5.9.2
junitPlatformVersion=1.9.2
mockitoKotlinVersion=4.1.0
mockitoVersion=5.3.0
mockitoVersion=5.3.1
osgiTestJunit5Version=1.2.1
postgresDriverVersion=42.6.0
slingVersion=3.3.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ import io.javalin.core.util.Header.WWW_AUTHENTICATE
import net.corda.rest.server.apigen.test.TestJavaPrimitivesRestResourceImpl
import net.corda.rest.server.config.models.RestServerSettings
import net.corda.rest.server.impl.apigen.processing.openapi.schema.toExample
import net.corda.rest.test.*
import net.corda.rest.test.CustomNonSerializableString
import net.corda.rest.test.CustomSerializationAPIImpl
import net.corda.rest.test.CustomUnsafeString
import net.corda.rest.test.TestEntityRestResourceImpl
import net.corda.rest.test.TestFileUploadImpl
import net.corda.rest.test.TestHealthCheckAPIImpl
import net.corda.rest.test.utils.ChecksumUtil
import net.corda.rest.test.utils.TestClientFileUpload
import net.corda.rest.test.utils.TestHttpClientUnirestImpl
import net.corda.rest.test.utils.WebRequest
import net.corda.rest.test.utils.WebResponse
import net.corda.rest.test.utils.multipartDir
import net.corda.rest.tools.HttpVerb.DELETE
import net.corda.rest.tools.HttpVerb.GET
import net.corda.rest.tools.HttpVerb.POST
Expand All @@ -23,12 +34,6 @@ import org.junit.jupiter.api.Test
import java.time.Instant
import java.time.ZonedDateTime
import kotlin.test.assertEquals
import net.corda.rest.test.utils.ChecksumUtil
import net.corda.rest.test.utils.TestClientFileUpload
import net.corda.rest.test.utils.TestHttpClientUnirestImpl
import net.corda.rest.test.utils.WebRequest
import net.corda.rest.test.utils.WebResponse
import net.corda.rest.test.utils.multipartDir

class RestServerRequestsTest : RestServerTestBase() {
companion object {
Expand Down Expand Up @@ -360,7 +365,7 @@ class RestServerRequestsTest : RestServerTestBase() {
val timeCallResponse = client.call(POST, WebRequest<Any>("health/timecall", """ { "time": { "time": "$time" } } """), userName, password)

assertEquals(HttpStatus.SC_OK, timeCallResponse.responseStatus)
assertEquals("2020-01-01T11:00Z[UTC]", timeCallResponse.body)
assertEquals("2020-01-01T11:00Z", timeCallResponse.body)
Copy link
Author

@driessamyn driessamyn Apr 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is triggered by an Jackson update. See FasterXML/jackson-modules-java8#204 and FasterXML/jackson-modules-java8#267

I think this change is ok as the new format is ISO-8601 compatible.

@mnesbit , do you agree this change is ok?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is fine and indeed probably more canonical

}

@Test
Expand Down
6 changes: 5 additions & 1 deletion testing/cpbs/sandbox-security-manager-one/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ cordapp {
}

dependencies {
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion"
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") {
// this transitive dependency is not needed as it is shaded in the jackson module, but there is a bug in
// the metadata: https://github.com/FasterXML/jackson-core/issues/999
exclude group: "ch.randelshofer"
}

cordaProvided platform("net.corda:corda-api:$cordaApiVersion")
compileOnly "org.osgi:org.osgi.service.component.annotations"
Expand Down
6 changes: 5 additions & 1 deletion testing/cpbs/sandbox-security-manager-two/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ cordapp {

dependencies {
cordaProvided platform("net.corda:corda-api:$cordaApiVersion")
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion"
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") {
// this transitive dependency is not needed as it is shaded in the jackson module, but there is a bug in
// the metadata: https://github.com/FasterXML/jackson-core/issues/999
exclude group: "ch.randelshofer"
}
compileOnly "org.osgi:org.osgi.service.component.annotations"
cordaProvided 'org.jetbrains.kotlin:kotlin-osgi-bundle'
cordaProvided 'net.corda:corda-application'
Expand Down