JavaDoc tool doesn't export the Method's Javadocs

My boss wanted me to deliver a full list of all of my JUnit tests I did on my code.

When he saw my exasperated expression he offered me to just export the test's javadocs and deliver it as a report, well that made me happy :-)

I've adopted writing javadocs all of the time as a good coding practice, so this task shouldn't have made me any problems, but... it did.

As you well know, I use Eclipse as my IDE, so I just went to file --> export --> javadoc.
Cool, everything seemed to work like a charm, till I looked at the javadocs - all was documented nicely except for - the method's javadocs, and that is where most of my javadocs are written.

What was my problem?
I found out that because I use JUnit 4 as my unit testing engine, I must use a @Test annotation, then I write my javadoc, here's my bug, apparently, when the tool sees an annotation it assumes the method's declaration has started, so when it tries exporting javadocs it doesn't look after any annotation it just jumps to the next method - where it finds another annotation and skips forward again.

So the solution is simple although tedious, I have just to swap the annotation and javadocs location, you on the other hand can write them in the right manner to begin with, and won't encounter the same problem.

Chaiavi.

Comments

Anonymous said…
> javadoc's bug

Nope, the Javadoc tool is correct. You just didn't write Javadoc in the first place (you wrote block comments inside the method declarations).
avi said…
I humbly give up, It is my bug, so I fixed the post accordingly.

Popular posts from this blog

Profiling Java @ 2019

Shared/Pro/Managed Hosting for your site - which to choose ? (NO AFFILIATE LINKS!)

ZVR converter