Skip to content

UnsafeCallOnNullableType should not be reported for platform types #880

Closed
@christophsturm

Description

@christophsturm

Expected Behavior

detekt should not complain about this code:

val version = UUID.randomUUID()!!

using !! here is a totally valid way to force kotlin to make version a non null type, and it's less verbose than specifying the type explicitly. It's also an autofix that IDEA suggests

Current Behavior

val version = UUID.randomUUID()!!

is reported as UnsafeCallOnNullableType

Your Environment

I use detekt via codacy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions