You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Mathieu Lirzin <ma...@nereide.fr> on 2018/07/03 12:53:40 UTC
Contributing/Coding guidelines (was: svn commit: r1834662 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java)
Hello Jacques,
Jacques Le Roux <ja...@les7arts.com> writes:
> OK I reviewed those they sounds good to me, here are my remarks
>
> I did not know about XXX tag http://www.outpost9.com/reference/jargon/jargon_21.html#TAG637 funny
I learned it from my fellow GNU hackers. ;-)
> private static final long serialVersionUID = -8765719278480440687L;
> In OFBiz we don't set serialVersionUID but let the system handles that for us and rather use @SuppressWarnings("serial") where necessary.
> More at https://markmail.org/message/jjhf5p5hbhon7vam and above. I'll
> try to write a word about that in our coding conventions or elsewhere?
I agree this should go in OFBiz coding conventions. Maybe this goes
beyond your question but it would be great if the contributing/coding
guidelines was included in the OFBiz developer manual instead of the
Wiki.
> Not a big deal but I saw you often (automatically?) format length lines to 80 or so
> - private final String defaultStatusCodeString = UtilProperties.getPropertyValue("requestHandler", "status-code", "302");
> + private final static String defaultStatusCodeString =
> + UtilProperties.getPropertyValue("requestHandler", "status-code", "302");
> We have commonly decided to use a length of lines 120, see
> https://cwiki.apache.org/confluence/display/OFBIZ/Coding+Conventions
> https://svn.apache.org/repos/asf/ofbiz/tools/wiki-files/OFBizJavaFormatter.xml
OK I will adjust my code. Maybe the line length of 120 could be
explicitly stated as an exception to the Sun standard [1]?
Thanks.
[1] http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-136091.html#313
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Re: Contributing/Coding guidelines
Posted by Mathieu Lirzin <ma...@nereide.fr>.
Jacques Le Roux <ja...@les7arts.com> writes:
> Le 05/07/2018 à 17:41, Jacques Le Roux a écrit :
>> Yes, good idea, I'll do so
>>
>> Thanks
> Done
Thanks Jacques.
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Re: Contributing/Coding guidelines
Posted by Jacques Le Roux <ja...@les7arts.com>.
Le 05/07/2018 à 17:41, Jacques Le Roux a écrit :
> Yes, good idea, I'll do so
>
> Thanks
Done
Jacques
Re: Contributing/Coding guidelines
Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Mathieu,
Le 03/07/2018 à 14:53, Mathieu Lirzin a écrit :
> Hello Jacques,
>
> Jacques Le Roux <ja...@les7arts.com> writes:
[snip]
>> private static final long serialVersionUID = -8765719278480440687L;
>> In OFBiz we don't set serialVersionUID but let the system handles that for us and rather use @SuppressWarnings("serial") where necessary.
>> More at https://markmail.org/message/jjhf5p5hbhon7vam and above. I'll
>> try to write a word about that in our coding conventions or elsewhere?
> I agree this should go in OFBiz coding conventions. Maybe this goes
> beyond your question but it would be great if the contributing/coding
> guidelines was included in the OFBiz developer manual instead of the
> Wiki.
I'll put it in the "coding conventions" page for now. I agree this page should better be in developer manual, I'll consider that in future, thanks for
the idea.
>> Not a big deal but I saw you often (automatically?) format length lines to 80 or so
>> - private final String defaultStatusCodeString = UtilProperties.getPropertyValue("requestHandler", "status-code", "302");
>> + private final static String defaultStatusCodeString =
>> + UtilProperties.getPropertyValue("requestHandler", "status-code", "302");
>> We have commonly decided to use a length of lines 120, see
>> https://cwiki.apache.org/confluence/display/OFBIZ/Coding+Conventions
>> https://svn.apache.org/repos/asf/ofbiz/tools/wiki-files/OFBizJavaFormatter.xml
> OK I will adjust my code. Maybe the line length of 120 could be
> explicitly stated as an exception to the Sun standard [1]?
Yes, good idea, I'll do so
Thanks
>
> Thanks.
>
> [1] http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-136091.html#313
>