Creating a string supplier should cost more than creating a string

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 8, 11, 17
    • Component/s: core-libs
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      In the javadoc for Objects.requireNonNull(obj, messageSupplier) it states:
      "While this may confer a performance advantage in the non-null case, when deciding to call this method care should be taken that the costs of creating the message supplier are less than the cost of just creating the string message directly."

      Creating a string message directly should cost less than creating the message supplier so it should say:
      "While this may confer a performance advantage in the non-null case, when deciding to call this method care should be taken that the costs of creating the message supplier are more than the cost of just creating the string message directly."


            Assignee:
            Joe Darcy
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: