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

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.1
    • Component/s: lang.*
    • Labels:
      None
    • Environment:

      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

            • Assignee:
              garydgregory Gary Gregory
              Reporter:
              garydgregory Gary Gregory
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: