Hi Claus,

There're many places in Camel (including the unit-tests) where an inner
class is declared to be nonstatic although a static one would also do the
job. On ther other hand as stands in the Java-Bible[1]   it makes sense in
such cases to move towards the static-ones. Best reason I see for this (as
already mentioned in [1]) is the avoidance of the extraneous reference to
it's enclosing instance which costs *time* and *space*. So that I can even
imagine that running the tests on the Apache CI-Servers would/could even run
faster! 

I've already a patch available on my workspace, but before creating a ticket
(including the patch), I first wanted to check what the Lead-Rider  thinks
about such a change.

Another question I have is regarding the patch I provided by [2]. Just
wonder why you didn't want to take over the 2 changes with
assertTrue(file.delete()) stuff in TestSupport: 

        // assert on the return value below so that we surely know that the
file has been deleted
        // as it could be that some native processes're sitting on the file
prohibiting the deletion
        // (i.e. on windows that could be the windows explorer, etc.)
        assertTrue(file.delete());

Or maybe even better:

        assertTrue("deletion of " + file.getAbsolutePath() + " failed!",
file.delete());

[1]
http://books.google.ch/books?id=ka2VUBqHiWkC&lpg=PA106&dq=effective%20java%20non%20static%20inner%20classes&pg=PA106#v=onepage&q&f=false
[2] https://issues.apache.org/jira/browse/CAMEL-4255

Regards, Babak

--
View this message in context: 
http://camel.465427.n5.nabble.com/Favor-static-member-classes-over-nonstatic-tp4634964p4634964.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to