You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DefaultCookieSerializer.setCookiePath missing @Nullable on cookiePath parameter #3883
Describe the bug DefaultCookieSerializer.setCookiePath doesn't accept null values.
This is in version 4.1.0.
setCookiePath is the setter for the cookiePath field, which is annotated with @Nullable, but it doesn't accept null values due to the missing annotation.
The setter documentation specifically calls out nullable values, so it is considered a valid value, but the setter input parameter doesn't mark it as @Nullable. Therefore passing null breaks in Kotlin 2.3.1 (likely in anything >= Kotlin 2.1).
To Reproduce
class CustomCookieSerializer: DefaultCookieSerializer() {
override fun writeCookieValue(cookieValue: CookieSerializer.CookieValue) {
setCookiePath(null)
}
}
Expected behavior
Able to call setCookiePath(null) without compilation errors
Activity
Annotate DefaultCookieSerializer.setCookiePath as @nullable
Annotate DefaultCookieSerializer.setCookiePath as @nullable