You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.
Validate.notIllegalArgument(buffer.isDirect(), new IllegalArgumentException(String.format("buffer.isDirect(): %b (expected: direct buffer)", buffer.isDirect())));
Second argument is executed independent of the truth value of the first one. Thus even buffer.isDirect is true, IllegalArgumentException constructor and String.format is executed. This yields unnecessary computation on CPU. An example jvisualvm CPU sampling is shown below.
The text was updated successfully, but these errors were encountered:
Validate.notIllegalArgument(buffer.isDirect(), new IllegalArgumentException(String.format("buffer.isDirect(): %b (expected: direct buffer)", buffer.isDirect())));
Second argument is executed independent of the truth value of the first one. Thus even
buffer.isDirect
is true, IllegalArgumentException constructor andString.format
is executed. This yields unnecessary computation on CPU. An example jvisualvm CPU sampling is shown below.The text was updated successfully, but these errors were encountered: