Skip to content

Commit 78df5fc

Browse files
committed
Fixed to clarify that caught exceptions are not used
1 parent 7300f25 commit 78df5fc

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinAnnotationIntrospector.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ internal class KotlinAnnotationIntrospector(
5050
}
5151
else -> null
5252
}
53-
} catch (ex: UnsupportedOperationException) {
53+
} catch (_: UnsupportedOperationException) {
5454
null
5555
}
5656
}

src/main/kotlin/com/fasterxml/jackson/module/kotlin/ReflectionCache.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private fun Constructor<*>.valueClassAwareKotlinFunction(): KFunction<*>? {
170170
declaringClass
171171
.getDeclaredConstructor(*parameterTypes, defaultConstructorMarker)
172172
.kotlinFunction
173-
} catch (t: Throwable) {
173+
} catch (_: Throwable) {
174174
null
175175
}
176176
}

src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/KotlinFeatures.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class TestM11Changes {
199199
try {
200200
person.phone
201201
fail("While person can be deserialized without a phone, phone must be set before attempting to access it")
202-
} catch(e: IllegalStateException) { // expected
202+
} catch(_: IllegalStateException) { // expected
203203
}
204204
}
205205

src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github161.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TestGithub161 {
1919
try {
2020
objectMapper.readValue(json, Foo::class.java)
2121
fail("Expected an error on the missing primitive value")
22-
} catch (ex: MismatchedInputException) {
22+
} catch (_: MismatchedInputException) {
2323
// success
2424
}
2525
}

0 commit comments

Comments
 (0)