Java Programming Basics

2013-10-29 Thread Glenn Adams
I've been noticing code recently that makes it clear the author was a C/C++ programmer unfamiliar with Java. Whenever I see these things, I am fixing them on the spot: (1) initializers are not required for class or instance members when their initial values are null, false, 0, etc; e.g. public

RE: Java Programming Basics

2013-10-29 Thread Dridi Seifeddine
never do these mistakes. All the best. Seifeddine P.S. Ignore this email if it was destined to someone else. De : Glenn Adams [mailto:gl...@skynav.com] Envoyé : mardi 29 octobre 2013 15:02 À : FOP Developers Objet : Java Programming Basics I've been noticing code recently

Re: Java Programming Basics

2013-10-29 Thread Glenn Adams
. ** ** *De :* Glenn Adams [mailto:gl...@skynav.com] *Envoyé :* mardi 29 octobre 2013 15:02 *À :* FOP Developers *Objet :* Java Programming Basics ** ** I've been noticing code recently that makes it clear the author was a C/C++ programmer unfamiliar with Java. Whenever I see

Re: Java Programming Basics

2013-10-29 Thread Adrian Cumiskey
Some PMD rules as part of the FOP build process would prevent these from occuring. Perhaps something to consider if everyone agrees with Glenn's comments? On Oct 29, 2013 10:02 PM, Glenn Adams gl...@skynav.com wrote: I've been noticing code recently that makes it clear the author was a C/C++

Re: Java Programming Basics

2013-10-29 Thread Adrian Cumiskey
My mistake, I spoke too soon before checking first. PMD is available but the pmd target is not run as part of the build.

Re: Java Programming Basics

2013-10-29 Thread Glenn Adams
Right now, we are only using Checkstyle and Findbugs. I'm not sure if there are Checkstyle rules that could catch these cases. If there are, they aren't enabled at present. On Tue, Oct 29, 2013 at 9:16 AM, Adrian Cumiskey adrian.cumis...@gmail.comwrote: My mistake, I spoke too soon before

Re: Java Programming Basics

2013-10-29 Thread Adrian Cumiskey
There is an ant pmd target which generates a report_pmd.html in the build directory. It is invoked from the reports target. On Oct 30, 2013 3:25 AM, Glenn Adams gl...@skynav.com wrote: Right now, we are only using Checkstyle and Findbugs. I'm not sure if there are Checkstyle rules that could

Re: Java Programming Basics

2013-10-29 Thread Adrian Cumiskey
I know you could catch these easily with PMD. Most projects that I have been involved with perform these kind of syntactic checks as a commit/build time hook. FOP currently offers this just as a reporting facility. On Oct 30, 2013 3:25 AM, Glenn Adams gl...@skynav.com wrote: Right now, we are