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."
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."