Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1525

Internally use Validate.notNull(foo, ...) instead of Validate.isTrue(foo != null, ...)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.10
    • Component/s: None
    • Labels:
      None

      Description

      We currently perform checks like:

      Validate.isTrue(foo != null, ...) 
      

      Which should be IMO:

      Validate.notNull(foo, ...);
      

      The difference being that the former throws IAE and the later NPE.
       
      As with [collections], my argument is the same, the JRE uses Objects.requireNonNull() to throw an NPE, so I'd like to keep normalizing on that.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ggregory Gary D. Gregory

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment