You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Marcel Offermans <ma...@luminis.nl> on 2007/08/15 12:52:23 UTC

Code style (was: svn commit: r566085 - /felix/trunk/shell/src/main/java/org/apache/felix/shell/impl/PsCommandImpl.java)

Hello Carsten,

Unfortunately, due to a DNS failure, I cannot currently access the  
felix website (infra seems to be aware of this), but I think the  
cleanup of the imports you did, did a bit more than just that. It  
prepended "this." in a lot of places, such as the one I quoted below:

>      public PsCommandImpl(BundleContext context)
>      {
> -        m_context = context;
> +        this.m_context = context;
>      }

That does not match with our code conventions on the site. We use  
"m_" so we don't need to prefix things with "this.". The question  
that now arises is, do we actively want to reformat the whole  
codebase according to our conventions? If so, I think we should  
discuss that first. For now I think it would be best to at least fix  
those "this." lines that have been introduced while organizing the  
imports.

Greetings, Marcel


Re: Code style

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Sorry I didn't see this thread before my other reply...anyway...

+1 to what Marcel said.  :-)

-> richard

Carsten Ziegeler wrote:
> Marcel Offermans wrote:
>   
>> On Aug 15, 2007, at 13:07 , Carsten Ziegeler wrote:
>>
>>     
>>> Argh, sure - yes I'll do that - I thought that I had turned off my
>>> Eclipse save actions for Felix, it appears I haven't. Sorry for that!
>>>       
>> Happens to me every now and then too! :) Sometimes Eclipse is just too
>> helpful! :) :)
>>
>>     
> Yepp, so true - in this case it even made one class completly useless by
> removing the start of a javadoc comment!
>
> Anyway, I removed the this statements before the instance variables.
>
> Carsten
>
>   

Re: Code style

Posted by Carsten Ziegeler <cz...@apache.org>.
Marcel Offermans wrote:
> On Aug 15, 2007, at 13:07 , Carsten Ziegeler wrote:
> 
>> Argh, sure - yes I'll do that - I thought that I had turned off my
>> Eclipse save actions for Felix, it appears I haven't. Sorry for that!
> 
> Happens to me every now and then too! :) Sometimes Eclipse is just too
> helpful! :) :)
> 
Yepp, so true - in this case it even made one class completly useless by
removing the start of a javadoc comment!

Anyway, I removed the this statements before the instance variables.

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Code style

Posted by Marcel Offermans <ma...@luminis.nl>.
On Aug 15, 2007, at 13:07 , Carsten Ziegeler wrote:

> Argh, sure - yes I'll do that - I thought that I had turned off my
> Eclipse save actions for Felix, it appears I haven't. Sorry for that!

Happens to me every now and then too! :) Sometimes Eclipse is just  
too helpful! :) :)

Greetings, Marcel


Re: Code style

Posted by Carsten Ziegeler <cz...@apache.org>.
Marcel Offermans wrote:
> Hello Carsten,
> 
> Unfortunately, due to a DNS failure, I cannot currently access the felix
> website (infra seems to be aware of this), but I think the cleanup of
> the imports you did, did a bit more than just that. It prepended "this."
> in a lot of places, such as the one I quoted below:
> 
>>      public PsCommandImpl(BundleContext context)
>>      {
>> -        m_context = context;
>> +        this.m_context = context;
>>      }
> 
> That does not match with our code conventions on the site. We use "m_"
> so we don't need to prefix things with "this.". The question that now
> arises is, do we actively want to reformat the whole codebase according
> to our conventions? If so, I think we should discuss that first. For now
> I think it would be best to at least fix those "this." lines that have
> been introduced while organizing the imports.
> 
Argh, sure - yes I'll do that - I thought that I had turned off my
Eclipse save actions for Felix, it appears I haven't. Sorry for that!

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org