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

Wrong exception in various NumberUtils method documentations

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.12.0
    • Fix Version/s: 3.13.0
    • Component/s: lang.math.*
    • Labels:

      Description

      The documentation of various methods in NumberUtils says an IllegalArgumentException is thrown in case of a null argument , e.g., see https://github.com/apache/commons-lang/blob/197d50434748bfb2db935266cfe740fc01a607ee/src/main/java/org/apache/commons/lang3/math/NumberUtils.java#L1194

       

      However, these methods throw a NullPointerException in this case. The following methods are affected:

      • long min(final long... array)
      • int min(final int... array)
      • short min(final short... array)
      • byte min(final byte... array)
      • static double min(final double... array)
      • float min(final float... array)
      • long max(final long... array)
      • int max(final int... array)
      • short max(final short... array)
      • byte max(final byte... array)
      • double max(final double... array)
      • float max(final float... array)
      • void validateArray(final Object array)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tobias2019 Tobias Helms

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1.5h
                1.5h

                  Issue deployment