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

Wrong exception in various NumberUtils method documentations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.12.0
    • 3.13.0
    • lang.math.*

    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

            Unassigned Unassigned
            tobias2019 Tobias Helms
            Votes:
            0 Vote for this issue
            Watchers:
            3 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 - 1.5h
                1.5h