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

In FieldUtils replace Validate.isTrue(object != null) with Validate.notNull(object)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 3.1
    • None
    • lang.reflect.*
    • None

    Description

      Methods in FieldUtils validate input using code like:

      Validate.isTrue(cls != null, "The class must not be null")
      

      This could be changed to:

      Validate.notNull(cls, "The class must not be null")
      

      However this could affect client code, since isTrue(boolean) throws IllegalArgumentException and notNull throws NullPointerException.

      Attachments

        Activity

          People

            Unassigned Unassigned
            britter Benedikt Ritter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: