You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Babak Vahdat <ba...@swissonline.ch> on 2012/01/05 17:34:42 UTC

Re: [DISCUSS] Trunk-Code-Cleanup

Hi

FYI I've extended the scope of [1] to also include:

- Avoidance of the raw type declarations by the generified classes *as much
as possible*

This will be a *manual* Refactoring step as I'm not aware of any automated
way for doing it.

[1] https://issues.apache.org/jira/browse/CAMEL-4796

Babak

--
View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-Trunk-Code-Cleanup-tp5071594p5123173.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: [DISCUSS] Trunk-Code-Cleanup

Posted by Babak Vahdat <ba...@swissonline.ch>.
Thanks a lot beforehand for the hint! I assume you mean the lines like:

// must do this ugly cast to avoid compiler error on AIX/HP-UX
ProcessorDefinition<?> defn = (ProcessorDefinition<?>) this;

which I carefully tried to skip by all the provided patches, however IMHO
*if* we reach the level of an appropriate usage of the java generics then
those casts will become obsolete and there will be no need more to help
compilers understand what we actually intend to do.

I would of course test any such changes along those lines on AIX/HP-UX as
well *before* applying.

Babak

--
View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-Trunk-Code-Cleanup-tp5071594p5158096.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: [DISCUSS] Trunk-Code-Cleanup

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Jan 19, 2012 at 4:43 PM, Babak Vahdat
<ba...@swissonline.ch> wrote:
> Hi,
>
> Through [1] & [2] the issues being mentioned by this thread have been
> already resolved. Before beginning of this activity
> I used to see 1991 compiler warnings, however right now only 310 are left,
> mostly because of the raw type references to the
> generic type ProcessorDefinition whose fixing would be not that trivial but
> hope to fix it as well at sometimes later. There're
> also two remaining tasks which we should better postpone, for which I've
> opened [3] to track by a Camel 3.x release.
>

You should be really careful changing generics in the model package
(eg the xxxDefinition) stuff.

As compilers on AIX, HP-UX, Solairs and other such platforms may not
compile the source code.
A few spots we got some special type casts to work around those platforms.

However their JDK may get better over time. But we may risk issues for
these people.



> That would be great if we could keep on that quality as otherwise in just
> couple of months we would be again there where we began
> with this! My thanks also to Claus & Hadrian for assisting me on the JIRA
> tickets at the time I couldn't touch the code by myself.
>
> [1] https://issues.apache.org/jira/browse/CAMEL-4796
> [2] https://issues.apache.org/jira/browse/CAMEL-4899
> [3] https://issues.apache.org/jira/browse/CAMEL-4921
>
> Babak
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-Trunk-Code-Cleanup-tp5071594p5158015.html
> Sent from the Camel Development mailing list archive at Nabble.com.



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

Re: [DISCUSS] Trunk-Code-Cleanup

Posted by Babak Vahdat <ba...@swissonline.ch>.
Hi,

Through [1] & [2] the issues being mentioned by this thread have been
already resolved. Before beginning of this activity
I used to see 1991 compiler warnings, however right now only 310 are left,
mostly because of the raw type references to the
generic type ProcessorDefinition whose fixing would be not that trivial but
hope to fix it as well at sometimes later. There're
also two remaining tasks which we should better postpone, for which I've
opened [3] to track by a Camel 3.x release.

That would be great if we could keep on that quality as otherwise in just
couple of months we would be again there where we began
with this! My thanks also to Claus & Hadrian for assisting me on the JIRA
tickets at the time I couldn't touch the code by myself.

[1] https://issues.apache.org/jira/browse/CAMEL-4796
[2] https://issues.apache.org/jira/browse/CAMEL-4899
[3] https://issues.apache.org/jira/browse/CAMEL-4921

Babak

--
View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-Trunk-Code-Cleanup-tp5071594p5158015.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: [DISCUSS] Trunk-Code-Cleanup

Posted by Bilgin Ibryam <bi...@gmail.com>.
On 12 January 2012 15:57, Hadrian Zbarcea <hz...@gmail.com> wrote:
> I realized and changed my comment. In my defense (I know I have none) both
> your names start with a 'B' are roughly the same lenght (5-6 chars) and you
> Babak threw so many small patches at us lately that you made my head spin.
> I'll get on the rawtypes patch now.
>
> Bilgin, I don't know how I can correct my mistake, but given the chance I
> will. Maybe supply the beer when we'll meet f2f?

I can accept f2f beers :)

>
> Sorry again,
Nothing to worry about.

Bilgin

> Hadrian
>
>
> On 01/12/2012 10:34 AM, Babak Vahdat wrote:
>>
>> Hi Hadrian,
>>
>> as you've already realized the patch [1] was provided by Bilgin and not me
>> (you welcome :-)).
>>
>> However I would have also something to be applied into the trunk as well
>> [2]
>> just in case you've got some spare time for verification and applying it.
>>
>> Thanks!
>>
>> [1] http://svn.apache.org/viewvc?view=revision&revision=1230571
>> [2] https://issues.apache.org/jira/browse/CAMEL-4796
>>
>> Babak
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/DISCUSS-Trunk-Code-Cleanup-tp5071594p5140218.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
>
>
> --
> Hadrian Zbarcea
> Principal Software Architect
> Talend, Inc
> http://coders.talend.com/
> http://camelbot.blogspot.com/

Re: [DISCUSS] Trunk-Code-Cleanup

Posted by Hadrian Zbarcea <hz...@gmail.com>.
I realized and changed my comment. In my defense (I know I have none) 
both your names start with a 'B' are roughly the same lenght (5-6 chars) 
and you Babak threw so many small patches at us lately that you made my 
head spin. I'll get on the rawtypes patch now.

Bilgin, I don't know how I can correct my mistake, but given the chance 
I will. Maybe supply the beer when we'll meet f2f?

Sorry again,
Hadrian

On 01/12/2012 10:34 AM, Babak Vahdat wrote:
> Hi Hadrian,
>
> as you've already realized the patch [1] was provided by Bilgin and not me
> (you welcome :-)).
>
> However I would have also something to be applied into the trunk as well [2]
> just in case you've got some spare time for verification and applying it.
>
> Thanks!
>
> [1] http://svn.apache.org/viewvc?view=revision&revision=1230571
> [2] https://issues.apache.org/jira/browse/CAMEL-4796
>
> Babak
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-Trunk-Code-Cleanup-tp5071594p5140218.html
> Sent from the Camel Development mailing list archive at Nabble.com.

-- 
Hadrian Zbarcea
Principal Software Architect
Talend, Inc
http://coders.talend.com/
http://camelbot.blogspot.com/

Re: [DISCUSS] Trunk-Code-Cleanup

Posted by Babak Vahdat <ba...@swissonline.ch>.
Hi Hadrian,

as you've already realized the patch [1] was provided by Bilgin and not me
(you welcome :-)).

However I would have also something to be applied into the trunk as well [2]
just in case you've got some spare time for verification and applying it.

Thanks!

[1] http://svn.apache.org/viewvc?view=revision&revision=1230571
[2] https://issues.apache.org/jira/browse/CAMEL-4796

Babak


--
View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-Trunk-Code-Cleanup-tp5071594p5140218.html
Sent from the Camel Development mailing list archive at Nabble.com.