equals() method genaration - ifs with curly braces

Hello All,

is it possible to tweak the default mechanism of equals() method generation so it creates if statements with curly braces {}? I ask because some tools (e.g. Sonar) report this as an issue, which is wrong, but adds some unecessary noise, which makes code quality reports less readable.

--
Regards,
Tomek Kaczanowski
http://practicalunittesting.com

4 comments
Comment actions Permalink

Before you generate the equals you need to switch the preference if() statement > Force braces to Always (Settings > Code Style > Java > Wrapping and Braces tab), or you can reformat the code after generation.

Regards

0
Comment actions Permalink

I personally find IntelliJ Configuration Server Plugin ( developed - with pleasure :)  - by JetBrains team) very useful for sharing the settings between different computers. You could give it a try.

Regards

0
Comment actions Permalink

We rather need some way to define a team-configuration which then is stored
in the repository, too. View-only settings like the tab-size should be
independent of it.

Tom

0
Comment actions Permalink

Thank you, I think this is what I wanted to know. :)

--
Regards,
Tomek Kaczanowski
http://practicalunittesting.com

0

Please sign in to leave a comment.