Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


ODL Coding style - Sun or Google Java?

asked 2015-02-12 22:09:02 -0800

Vishal Thapar gravatar image

updated 2015-02-13 03:05:38 -0800

Tony Tkacik gravatar image

I am using Eclipse as IDE for ODL code and as per the wiki I should be using google-java-style.xml. However, in controller/opendaylight/commons/parent/ I see sun_coding_style.xml

What should I be actually using?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-02-13 00:23:35 -0800

Tony Tkacik gravatar image

updated 2015-02-13 00:24:09 -0800

Sun coding style was used in original contribution of Controller and AD-SAL and is mostly used in AD-SAL.

Google Java Style is used in newer code such as YANGTools, MD-SAL, etc... so I would say prefer Google Java Style, since community decided on going with that style.

edit flag offensive delete publish link more


Thank you. One more question: What about when fixing bugs in existing code written with Sun Coding Style? Do we need to adhere to it or okay to use Google Java?

Vishal Thapar ( 2015-02-13 00:27:24 -0800 )edit

I believe it is on per-project basis - but for yangtools and controller I would suggest Google Java with modifications described in wiki.

Tony Tkacik ( 2015-02-13 03:05:07 -0800 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-02-12 22:09:02 -0800

Seen: 655 times

Last updated: Feb 13 '15