Replace UtilWaitThread.sleepUninterruptibly with guava equivalent#3121
Conversation
|
Are there any newer java 11 added options instead of guava? |
|
I thought we were trying to remove Guava dependencies in general. |
|
It definitely makes sense to me to first try and use native Java code/utilities when possible, such as lambdas instead of Guavas iterable utilities. But if something doesn't exist I think it would be fine to use the utility in Guava or something like a Commons library so we don't have to re-invent the wheel, assuming the plan isn't to actually remove the dependency entirely at some point. |
I agree with these points. @EdColeman I don't know of/can't find any native java replacements for this. That's not to say one does not exist but I haven't been able to find anything yet. @dlmarion As for removing guava, I am not sure either. My understanding is that when possible, we should avoid using guava for a built in equivalent, not sure if we have plans to completely remove it as a dependency though. |
|
I don't think we have a plan to remove Guava entirely. We have tried to avoid the problematic beta methods, certainly. It's also good to reduce our dependency on any external library, Guava is not an exception to that. The |
|
Is the build failure transient - or is there a dependency that needs to be adjusted? |
No, it isn't transient. The build is passing from a "used undeclared" dependency warning. Looking into solutions now - should have a fix up soon. |
Fixed in ac427d0 @EdColeman |
cshannon
left a comment
There was a problem hiding this comment.
This seems fine to me now that the checks are passing unless anyone else has any comments or concerns.
UtilWaitThread.sleepUninterruptiblywas copied from guavasUninterruptibles.sleepUninterruptiblywhen it was still tagged as beta. With the version of guava we are using,Uninterruptibles.sleepUninterruptiblyis no longer tagged as beta. This PR removes the copied method and uses guava directly.