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

MethodUtils.invokeMethod NullPointerException in case of null in args list

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

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 3.10
    • 3.12.0
    • lang.reflect.*
    • None

    Description

      MethodUtils:774

       

      if (classArray[offset].equals(toClassArray[offset]))

      { continue; }

      else if (ClassUtils.isAssignable(classArray[offset], toClassArray[offset], true)

       

      cause NPE if classArray[offset] is null. Can you please extend the if condition with a null check, like this?

       

      if (classArray[offset] != null && classArray[offset].equals(toClassArray[offset]))

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            nagy_peter Peter Nagy
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 3h 40m
              3h 40m

              Slack

                Issue deployment