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
CommonUtils.throwArgNull and ArgumentUtils.throwArgBlank both do the same activity as Objects.requireNonNull. From recent conversations the coding standard has converged on using Objects.requireNonNull as the preferred method for performing null checks to back the @NonNull attribute.
Let's double check if CommonUtils.throwArgNull and ArgumentUtils.throwArgBlank is not used anymore and is removed. In that case the issue can be closed
In #10433 we removed all uses of CommonUtils.throwArgNull and removed the method.
All uses of CommonUtils.throwArgBlank were changed to ArgumentUtils.throwArgBlank, and CommonUtils.throwArgBlank was removed.
There are still 12 classes in the codebase that use ArgumentUtils.throwArgBlank; changing those for Objects.requireNonNull would change the validation functionality as we would be removing the check for blank values.
I can't find in the attached discussions where this specific change is discussed.
I imagine that the functionality change is expected but could you please confirm @edward-swirldslabs.
Thanks!
I'm not sure why I thought throwArgBlank could be replaced by Objects.requireNonNull. The check that a string is not all white space is not something that a check for nonNull can cover. At this point I would have to relax my request and just standardize the null check on Objects.RequireNonNull. There doesn't seem to be a standard library function that throws an exception if a string.isBlank() is true.
CommonUtils.throwArgNull
andArgumentUtils.throwArgBlank
both do the same activity asObjects.requireNonNull
. From recent conversations the coding standard has converged on usingObjects.requireNonNull
as the preferred method for performing null checks to back the@NonNull
attribute.conversation 1
conversation 2
Decision/Outcome
CommonUtils.throwArgNull
andArgumentUtils.throwArgBlank
should be deprecated and direct people to useObjects.requireNonNull
.The text was updated successfully, but these errors were encountered: