cadence-java-client icon indicating copy to clipboard operation
cadence-java-client copied to clipboard

Confusing naming convention of MethodRetry annotation doNotRetry parameter

Open mwoss opened this issue 4 years ago • 0 comments

Hi all :DD! I have a question regarding the doNotRetry parameter of MethodRetry annotation. As the name suggests, I would expect this parameter accepts an exception or a list of exceptions that will be used as information for Cadence workers or server to know when do not retry activity exception is thrown. However, according to the documentation, this annotation parameter is used to tell workers/server on which exception the activity must be retried. This is a contradiction in my opinion.

~~Looking at clinet code I will assume that the second option is correct. In that case, should doNotRetry parameter be renamed to doRetry or something similar?~~

Edit: Apologies, I think I was wrong. The parameter does exactly what it should do, but still, documentation is a bit misleading and in my opinion, should be corrected.

Documentation: Java doc - MathodRetry, doNotRetry paramater

mwoss avatar Jan 27 '21 16:01 mwoss