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

Include the actual type in the Validate.isInstance and isAssignableFrom exception messages.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.1
    • 3.1
    • lang.*
    • None

    Description

      The message for the exception thrown by Validate.isInstance and isAssignableFrom do not mention the actual type, only the expected type.

      trunk: "The validated object is not an instance of %s"

      Proposal:

      • isAssignableFrom: "Cannot assign a java.lang.String to a java.util.List"
      • isInstance: "Expected type: java.util.List, actual: java.lang.String"

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: