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

MethodUtils.invokeMethod NullPointerException in case of null in args list

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.10
    • Fix Version/s: 3.12.0
    • Component/s: lang.reflect.*
    • Labels:
      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

            People

            • Assignee:
              Unassigned
              Reporter:
              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