Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14673

Utilize org.wildfly.common.Assert for Null-Checks

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Minor
    • 24.0.0.Beta1, 24.0.0.Final
    • 23.0.0.Final
    • None
    • None
    • Undefined

    Description

      Currently there are different approaches to have null checks of parameters and throw a NullPointerException or IllegalArgumentException. Most of them do not offer the parameter name which is null or causing a null lookup. Some of them offer the parameter name but are not I18N. Some offer both, but don't reuse the common solution.
      There is an existing solution for these cases:
      org.wildfly.common.Assert.checkNotNullParamWithNullPointerException;
      org.wildfly.common.Assert.checkNotNullParam;

      The approach is to have the same method signature, keep NullPointerException and/or IllegalArgumentException in the same way as now. Only the check and throw is changed with the mentioned methods.
      Some modules require org.wildfly.common as new dependency.

      Attachments

        Activity

          People

            xf01213 Boris Unckel (Inactive)
            xf01213 Boris Unckel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: