Skip to content

Issue with nullability and checked vs. unchecked exceptions #198

Closed
@dwalluck

Description

@dwalluck

@ppkarwasz I have two questions about #175.

  1. Why are there no @NonNull annotations and only @Nullable annotations, e.g., why isn't it public PackageURL(@NonNull String)? I'd prefer to make it so that any private APIs could be marked as @NonNull, at least, since all input for those methods come internally.
  2. Previously, a null type or name produced a checked MalformedPackageURLException and now they produce an unchecked NullPointerException which in the tests requires catching NullPointerException which violates, e.g., DCN_NULLPOINTER_EXCEPTION.I think it's best to put back the MalformedPackageURLException in the case of the constructors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions