commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CLI-121) Tests fail under 1.6 + error at end that may or may not be related
Date Wed, 02 Jan 2008 11:06:34 GMT

     [ https://issues.apache.org/jira/browse/CLI-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oliver Heger updated CLI-121:
-----------------------------

    Attachment: cli-121.diff

PatternBuilder used to store all defined options in a set, so there is no guarantee for the
order, in which they are returned. Obviously an implementation change between JDK 1.5 and
1.6 produces a different order and causes this test to fail.

The attached patch changes PatternBuilder to use a LinkedHashSet instead, which keeps the
order of created options. (Alternatively the test could be changed so that it does not force
a certain order, but I think the order, in which options are defined by PatternBuilder may
be important anyway.)

Note that LinkedHashSet is available in JDK 1.4+ only. Which are the JDK requirements for
CLI2?

I cannot reproduce the other error related to a XML configuration.

> Tests fail under 1.6 + error at end that may or may not be related
> ------------------------------------------------------------------
>
>                 Key: CLI-121
>                 URL: https://issues.apache.org/jira/browse/CLI-121
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: CLI-2.x
>         Environment: JDK 1.6
>            Reporter: Henri Yandell
>             Fix For: 2.0
>
>         Attachments: cli-121.diff
>
>
> Testsuite: org.apache.commons.cli2.bug.Bug27575Test
> Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.058 sec
> Testcase: testRequiredOptions(org.apache.commons.cli2.bug.Bug27575Test):        FAILED
> expected:<[-h]> but was:<-c <arg>>
> junit.framework.ComparisonFailure: expected:<[-h]> but was:<-c <arg>>
>         at org.apache.commons.cli2.bug.Bug27575Test.testRequiredOptions(Bug27575Test.java:36)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> and error at end of:
> Exception in thread "Thread-1" javax.xml.transform.TransformerFactoryConfigurationError:
Provider for javax.xml.transform.TransformerFactory cannot be found
>         at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
>         at java.util.prefs.XmlSupport.writeDoc(XmlSupport.java:246)
>         at java.util.prefs.XmlSupport.exportMap(XmlSupport.java:333)
>         at java.util.prefs.FileSystemPreferences$8.run(FileSystemPreferences.java:607)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message