On Tue, Jun 19, 2012 at 9:09 AM, Henryk Konsek <hekon...@gmail.com> wrote:
> Hi,
>
> What about replacing anonymous inner noop AsyncCallback with
> EmptyAsyncCallback? Just to make a codebase a little bit nicer.
>
> // Bad
> Object value = invocation.proceed(new AsyncCallback() {
> public void done(boolean doneSync) { // nnop }
> }, sync);
>
> // Good
> Object value = invocation.proceed(new EmptyAsyncCallback(), sync);
>
> Patch attached in Jira issue [1] if you like the idea.
>
> Laters.
>
> [1] https://issues.apache.org/jira/browse/CAMEL-5379
>
> --
> Henryk Konsek
> http://henryk-konsek.blogspot.com

We should probably name it NoopAsyncCallback as IMHO thats a better name.
Also we may consider a single static instance as its just a noop, eg
like Collections.emptyList() does.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to