commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
Subject Re: [VOTE] Release Commons CLI 1.2 (RC6)
Date Thu, 12 Mar 2009 23:12:58 GMT
Henri Yandell wrote:

> One more try :)
> Stating that the Java version is 1.4 on the website will be done
> post-release (I'm going to split the CLI and CLI2 websites).

Actually I could not let go this failing test with IBM JDK running on Maven
without any reason. And finally I found out the problem. Looking at the
failing test, it was clear that something must have been left in the
OptionBuilder from a previous test. Therefore I've added some code to
OptionBuilder.create that printed out the last method on the stack that was
not from OptionBuilder. I found out that the last test before the failing
HelpFormatterTest.printOptionGroupUsage that made usage of the
OptionBuilder was OptionBuilderTest.testCreateIncompleteOption. In this
method an argument is added and then create fails throwing an IAE and the
OptionBuilder.reset method is therefore not called. A lot of unit tests
later the HelpFormatterTest.printOptionGroupUsage is the first test that
makes usage of the OptionBuilder again ... and "inherits" that old
argument. The problem appears only because the sequence of the tests are
different for the IBM JDK 6 in Maven.

The question is: What should a user expect from the OptionBuilder? If
OptionBuilder.create() throws IAE (or he forgets to call create), the next
usage of the builder will "inherit" the old settings. OTOH both situations
are programming errors. This might be viewed as minor problem though, since
the OptionBuilder is normally used in an early stage of the application
flow only. At least something should be in the JavaDoc that this class is
not thread safe and that create() must be called to reset the builder for
the next usage.

Therefore we may either ensure that a call to create will always reset the
builder in case of an IAE (CLI-177) or we can simply fix the tests that use
the builder by calling reset manually in the setUp (actually we must create
a simple option, since reset is private). Shall I commit this?

Another problem of the site:

Project Documentation/Project Reports/Javadoc is the following link:

However, this is Javadoc of CLI2 ?!?

Actually most Maven reports (Project Summary, Checkstyle, Cobertura Test
Coverage, JavaDocs, JDepend, RAT Report, Source Xref, Surefire Report, Test
JavaDocs and Test Source Xref) cover CLI2.

- Jörg

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message