Hi Claus, On Fri, Mar 17, 2017 at 9:09 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > On Thu, Mar 16, 2017 at 11:51 PM, Zoran Regvart <zo...@regvart.com> wrote: >> Yeah, >> I'm only worried that this would introduce confusion amongst users, >> and once we release a version of Camel with this it's forever there. >> > > Yeah we could revert it.
I'm leaning on doing that, and as a side note I should have based that on java.lang.AutoCloseable not on java.io.Closeable, that would make more sense > Or what if you add closable on ServiceSupport which they all extend, > would it work with try with resources still, and then you can > implement the close method directly on ServiceSupport which maybe > would not cause Eclipse to show that problem? doesn't help, I think it tracks if the call to close() is from user code, which is makes sense if it doesn't look at the call graph, so if I move the logic in stop() into close() and make stop() delegate to close() I get the same warning, and from what I can read in the Eclipse docs[1] this is not the case today > If not we can log a ticket about an API change for Camel 3.0. And look > at this then. perhaps for 3.0 would make sense to switch close() and stop(), or perhaps in that time tools will look at the call graph I wonder what other tools like Sonar think about this, I'll try to check that... zoran [1] http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-avoiding_resource_leaks.htm -- Zoran Regvart