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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.10
    • None
    • 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

            Unassigned Unassigned
            ggregory Gary D. Gregory
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: