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/17 17:19:23 UTC

[DISCUSS] - About the setup.eclipse Profile we have

Hi,

couple of weeks ago I had a long mail conversation with Dan Kulp concerning
(among others) the compiler warnings he
sees by his workspace (just around 40) and I see on my workspace (almost
2000!).

The reason for this deviation was of course the fact that Dan made use of
the setup.eclipse Profile [1] while I just
created my workspace from the scratch using eclipse itself with it's default
settings.

IMHO we should consolidate [2] in that we do *not* ignore what compiler has
to say to us. The same rule also applies
for the Camel users as well who hopefully do *not* ignore the WARNINGs Camel
logs by their apps.

We should better remove all the lines below in [2] and let eclipse use it's
default compiler settings, as you see we
instruct eclipse [2] to just "ignore":


<propertyfile
file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
  <entry key="org.eclipse.jdt.core.compiler.problem.missingSerialVersion"
value="ignore" />
  <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport"
value="ignore" />
  <entry
key="org.eclipse.jdt.core.compiler.problem.annotationSuperInterface"
value="ignore" />
  <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference"
value="ignore" />
</propertyfile>

IMHO the worst one is "rawTypeReference" which by it's absence one would get
odd ClassCastException first at *run-time*, however
a proper usage of generics helps to have type-safety at *compile-time*. BTW
I think we should also better make use of
org.apache.camel.util.CastUtils class as little as possible, that's *only*
when there's no other option left!

If (almost) all agree I'll open a ticket to fix this, see also the defaults
[3] of the "-warn" option by the eclipse compiler.

WDYT?

[1] http://camel.apache.org/building.html
[2] https://svn.apache.org/repos/asf/camel/trunk/etc/pom.xml
[3]
http://help.eclipse.org/helios/topic/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm

Babak

--
View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-About-the-setup-eclipse-Profile-we-have-tp5152042p5152042.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: [DISCUSS] - About the setup.eclipse Profile we have

Posted by Johan Edstrom <se...@gmail.com>.
Eclipse? :)

+1 - sure.

On Jan 18, 2012, at 12:45 AM, Jean-Baptiste Onofré wrote:

> Hi Babak,
> 
> to be honest I don't care as I don't use Eclipse ;)
> So you have my +1
> 
> Regards
> JB
> 
> On 01/17/2012 05:19 PM, Babak Vahdat wrote:
>> Hi,
>> 
>> couple of weeks ago I had a long mail conversation with Dan Kulp concerning
>> (among others) the compiler warnings he
>> sees by his workspace (just around 40) and I see on my workspace (almost
>> 2000!).
>> 
>> The reason for this deviation was of course the fact that Dan made use of
>> the setup.eclipse Profile [1] while I just
>> created my workspace from the scratch using eclipse itself with it's default
>> settings.
>> 
>> IMHO we should consolidate [2] in that we do *not* ignore what compiler has
>> to say to us. The same rule also applies
>> for the Camel users as well who hopefully do *not* ignore the WARNINGs Camel
>> logs by their apps.
>> 
>> We should better remove all the lines below in [2] and let eclipse use it's
>> default compiler settings, as you see we
>> instruct eclipse [2] to just "ignore":
>> 
>> 
>> <propertyfile
>> file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
>>   <entry key="org.eclipse.jdt.core.compiler.problem.missingSerialVersion"
>> value="ignore" />
>>   <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport"
>> value="ignore" />
>>   <entry
>> key="org.eclipse.jdt.core.compiler.problem.annotationSuperInterface"
>> value="ignore" />
>>   <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference"
>> value="ignore" />
>> </propertyfile>
>> 
>> IMHO the worst one is "rawTypeReference" which by it's absence one would get
>> odd ClassCastException first at *run-time*, however
>> a proper usage of generics helps to have type-safety at *compile-time*. BTW
>> I think we should also better make use of
>> org.apache.camel.util.CastUtils class as little as possible, that's *only*
>> when there's no other option left!
>> 
>> If (almost) all agree I'll open a ticket to fix this, see also the defaults
>> [3] of the "-warn" option by the eclipse compiler.
>> 
>> WDYT?
>> 
>> [1] http://camel.apache.org/building.html
>> [2] https://svn.apache.org/repos/asf/camel/trunk/etc/pom.xml
>> [3]
>> http://help.eclipse.org/helios/topic/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm
>> 
>> Babak
>> 
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-About-the-setup-eclipse-Profile-we-have-tp5152042p5152042.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: [DISCUSS] - About the setup.eclipse Profile we have

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Babak,

you are right, I use IntelliJ IDEA, and the project settings are up to date.

Regards
JB

On 01/18/2012 11:34 AM, Babak Vahdat wrote:
> Hi Jean,
>
> Thanks for your feedback! So I assume you make use of the IntelliJ (and not
> NetBeans IDE :-)).
>
> As far as I see [1] is the only piece of the cake we've got there for the
> IntelliJ folks and inside there nothing is touched/overridden regarding the
> compiler settings, so we should be fine there!
>
> [1] https://svn.apache.org/repos/asf/camel/trunk/etc/idea/settings.jar
>
> Babak
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-About-the-setup-eclipse-Profile-we-have-tp5152042p5154415.html
> Sent from the Camel Development mailing list archive at Nabble.com.

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSS] - About the setup.eclipse Profile we have

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

Thanks for your feedback! So I assume you make use of the IntelliJ (and not
NetBeans IDE :-)).

As far as I see [1] is the only piece of the cake we've got there for the
IntelliJ folks and inside there nothing is touched/overridden regarding the
compiler settings, so we should be fine there!

[1] https://svn.apache.org/repos/asf/camel/trunk/etc/idea/settings.jar

Babak

--
View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-About-the-setup-eclipse-Profile-we-have-tp5152042p5154415.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: [DISCUSS] - About the setup.eclipse Profile we have

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Babak,

to be honest I don't care as I don't use Eclipse ;)
So you have my +1

Regards
JB

On 01/17/2012 05:19 PM, Babak Vahdat wrote:
> Hi,
>
> couple of weeks ago I had a long mail conversation with Dan Kulp concerning
> (among others) the compiler warnings he
> sees by his workspace (just around 40) and I see on my workspace (almost
> 2000!).
>
> The reason for this deviation was of course the fact that Dan made use of
> the setup.eclipse Profile [1] while I just
> created my workspace from the scratch using eclipse itself with it's default
> settings.
>
> IMHO we should consolidate [2] in that we do *not* ignore what compiler has
> to say to us. The same rule also applies
> for the Camel users as well who hopefully do *not* ignore the WARNINGs Camel
> logs by their apps.
>
> We should better remove all the lines below in [2] and let eclipse use it's
> default compiler settings, as you see we
> instruct eclipse [2] to just "ignore":
>
>
> <propertyfile
> file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
>    <entry key="org.eclipse.jdt.core.compiler.problem.missingSerialVersion"
> value="ignore" />
>    <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport"
> value="ignore" />
>    <entry
> key="org.eclipse.jdt.core.compiler.problem.annotationSuperInterface"
> value="ignore" />
>    <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference"
> value="ignore" />
> </propertyfile>
>
> IMHO the worst one is "rawTypeReference" which by it's absence one would get
> odd ClassCastException first at *run-time*, however
> a proper usage of generics helps to have type-safety at *compile-time*. BTW
> I think we should also better make use of
> org.apache.camel.util.CastUtils class as little as possible, that's *only*
> when there's no other option left!
>
> If (almost) all agree I'll open a ticket to fix this, see also the defaults
> [3] of the "-warn" option by the eclipse compiler.
>
> WDYT?
>
> [1] http://camel.apache.org/building.html
> [2] https://svn.apache.org/repos/asf/camel/trunk/etc/pom.xml
> [3]
> http://help.eclipse.org/helios/topic/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm
>
> Babak
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-About-the-setup-eclipse-Profile-we-have-tp5152042p5152042.html
> Sent from the Camel Development mailing list archive at Nabble.com.

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSS] - About the setup.eclipse Profile we have

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, January 17, 2012 8:31:06 AM Babak Vahdat wrote:
> BTW Dan has already fixed the issue I've mentioned by the camel pom itself
> [1]. However I don't get why we've got the same eclipse stuff in [2] again.
> 
> [1] http://svn.apache.org/viewvc?view=revision&revision=1229568
> [2] https://svn.apache.org/repos/asf/camel/trunk/etc/pom.xml

I have absolutely no idea what the pom in etc is for.  I'd suggest nuking it 
to avoid confusion.

One note, however, is if we have a lot of folks cleaning things up in intellij 
as well as eclipse, we MAY want to turn off the warnings (in eclipse) for the 
"Unhandled token in SuppressWarnings".   Intellij has it's own set of 
suppression tokens that can be stuck in SuppressWarnings, but that then 
generates warnings in Eclipse.   And in eclipse, there isn't a 
SuppressWarnings  token that can be used to suppress the unsupported token 
warning.  :-)

That said, we can cross that bridge when we get there.  :-)


Dan



> 
> Babak
> 
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/DISCUSS-About-the-setup-eclipse-Profile-w
> e-have-tp5152042p5152075.html Sent from the Camel Development mailing list
> archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Re: [DISCUSS] - About the setup.eclipse Profile we have

Posted by Babak Vahdat <ba...@swissonline.ch>.
BTW Dan has already fixed the issue I've mentioned by the camel pom itself
[1]. However I don't get why we've got the same eclipse stuff in [2] again.

[1] http://svn.apache.org/viewvc?view=revision&revision=1229568
[2] https://svn.apache.org/repos/asf/camel/trunk/etc/pom.xml

Babak

--
View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-About-the-setup-eclipse-Profile-we-have-tp5152042p5152075.html
Sent from the Camel Development mailing list archive at Nabble.com.