Skip to content

Commit 0b56978

Browse files
authored
Merge pull request #1077 from k163377/upd-deprecateds
Increase deprecation level of NewStrictNullChecks due to version upgrade
2 parents 9101f56 + 09711a7 commit 0b56978

File tree

6 files changed

+15
-2
lines changed

6 files changed

+15
-2
lines changed

release-notes/CREDITS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ Authors:
1717

1818
Contributors:
1919

20+
# 3.1.0 (not yet released)
21+
22+
WrongWrong (@k163377)
23+
* #1077: Increase deprecation level of NewStrictNullChecks due to version upgrade
24+
2025
# 3.0.0-rc5 (not yet released)
2126

2227
WrongWrong (@k163377)

release-notes/VERSION

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ Former maintainers:
2222
=== Releases ===
2323
------------------------------------------------------------------------
2424

25+
3.1.0 (not yet released)
26+
27+
WrongWrong (@k163377)
28+
#1077: Increase deprecation level of NewStrictNullChecks due to version upgrade
29+
2530
3.0.3 (28-Nov-2025)
2631
3.0.2 (07-Nov-2025)
2732
3.0.1 (21-Oct-2025)

src/main/kotlin/tools/jackson/module/kotlin/KotlinFeature.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ enum class KotlinFeature(internal val enabledByDefault: Boolean) {
8585
* Also, specifying both this and [StrictNullChecks] is not permitted.
8686
*/
8787
@Deprecated(
88-
level = DeprecationLevel.WARNING,
88+
level = DeprecationLevel.ERROR,
8989
message = "This option will be merged into StrictNullChecks in 3.2.",
9090
replaceWith = ReplaceWith("StrictNullChecks")
9191
)

src/main/kotlin/tools/jackson/module/kotlin/KotlinModule.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class KotlinModule private constructor(
3737
strictNullChecks: Boolean = StrictNullChecks.enabledByDefault,
3838
val kotlinPropertyNameAsImplicitName: Boolean = KotlinPropertyNameAsImplicitName.enabledByDefault,
3939
val useJavaDurationConversion: Boolean = UseJavaDurationConversion.enabledByDefault,
40+
@Suppress("DEPRECATION_ERROR")
4041
newStrictNullChecks: Boolean = NewStrictNullChecks.enabledByDefault,
4142
) : SimpleModule(KotlinModule::class.java.name, PackageVersion.VERSION) {
4243
// To reduce the amount of destructive changes, no properties will be added to the public.
@@ -70,6 +71,7 @@ class KotlinModule private constructor(
7071
builder.isEnabled(StrictNullChecks),
7172
builder.isEnabled(KotlinPropertyNameAsImplicitName),
7273
builder.isEnabled(UseJavaDurationConversion),
74+
@Suppress("DEPRECATION_ERROR")
7375
builder.isEnabled(NewStrictNullChecks),
7476
)
7577

src/test/kotlin/tools/jackson/module/kotlin/DslTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import org.junit.jupiter.api.Assertions.assertNotNull
44
import org.junit.jupiter.api.Test
55
import tools.jackson.core.json.JsonReadFeature
66
import tools.jackson.core.json.JsonWriteFeature
7-
import tools.jackson.module.kotlin.KotlinFeature.NewStrictNullChecks
87
import tools.jackson.module.kotlin.KotlinFeature.NullIsSameAsDefault
98
import tools.jackson.module.kotlin.KotlinFeature.NullToEmptyCollection
109
import tools.jackson.module.kotlin.KotlinFeature.NullToEmptyMap

src/test/kotlin/tools/jackson/module/kotlin/KotlinModuleTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class KotlinModuleTest {
2222
fun strictNullChecksTests() {
2323
assertTrue(
2424
kotlinModule {
25+
@Suppress("DEPRECATION_ERROR")
2526
disable(NewStrictNullChecks)
2627
enable(StrictNullChecks)
2728
}.strictNullChecks
@@ -31,6 +32,7 @@ class KotlinModuleTest {
3132
assertThrows<IllegalArgumentException> {
3233
kotlinModule {
3334
enable(StrictNullChecks)
35+
@Suppress("DEPRECATION_ERROR")
3436
enable(NewStrictNullChecks)
3537
}
3638
}

0 commit comments

Comments
 (0)