Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8142493

Utility methods to check indexes and ranges doesn't specify behavior when function produces null

    Details

    • Subcomponent:
    • Resolved In Build:
      b94
    • Verification:
      Verified

      Backports

        Description

        Each of the following lines

                    Objects.checkIndex(1, 1, (a,b) -> null);
                    Objects.checkFromToIndex(1, 7, 2, (a,b) -> null);
                    Objects.checkFromIndexSize(1, 7, 2, (a,b) -> null);

        produce NPE however this behavior doesn't seem to be specified by JDK-8135248

        If would be helpful to have the spec mention these thrown NPEs


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  psandoz Paul Sandoz
                  Reporter:
                  dbessono Dmitry Bessonov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: