What problem are you trying to solve?
@Timeout(10000) is most likely an error since the default timeout unit is SECONDS.
Describe the solution you'd like
There are two possibilities:
a) rewrite @Timeout(10000) => @Timeout(value = 167, unit = TimeUnit.MINUTES). This preserves semantics, and the users will probably realize they do not mean MINUTES.
@Timeout(1000) could probably be rewritten to @Timeout(value = 17, unit = TimeUnit.MINUTES).
b) Rewrite @Timeout(10000) => @Timeout(10). This changes semantics, however, it is most likely something the user wanted in the first place.
I am not sure what is the overall design for OpenRewrite. I am leaning towards option a) which is "keep semantics, make the error much more visible for the users".
What problem are you trying to solve?
@Timeout(10000)is most likely an error since the default timeout unit isSECONDS.Describe the solution you'd like
There are two possibilities:
a) rewrite
@Timeout(10000)=>@Timeout(value = 167, unit = TimeUnit.MINUTES). This preserves semantics, and the users will probably realize they do not meanMINUTES.@Timeout(1000)could probably be rewritten to@Timeout(value = 17, unit = TimeUnit.MINUTES).b) Rewrite
@Timeout(10000)=>@Timeout(10). This changes semantics, however, it is most likely something the user wanted in the first place.I am not sure what is the overall design for OpenRewrite. I am leaning towards option
a)which is "keep semantics, make the error much more visible for the users".