Issue Details (XML | Word | Printable)

Key: CLI-170
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: J. Lewis Muir
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons CLI

TypeHandler prints messages to stderr

Created: 27/Sep/08 03:16 PM   Updated: 17/Jan/09 08:24 AM
Return to search
Component/s: Validation
Affects Version/s: 1.1
Fix Version/s: 1.2

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works CLI-170.patch 2009-01-14 06:20 AM Henri Yandell 5 kB
Text File Licensed for inclusion in ASF works remove-messages-to-stderr.patch 2008-09-27 03:17 PM J. Lewis Muir 1 kB

Resolution Date: 17/Jan/09 08:24 AM


 Description  « Hide
Certain methods in TypeHandler print a message to stderr when they are unable to create the object they are to return. I don't think this should be. The documentation for each method clearly states that if it is unable to create the object, it returns null. If more information should be reported to the caller, these methods should be changed to throw an exception. I've removed the printing of these messages from TypeHandler.

This fix also makes the unit test output clean. Right now, certain test cases exercise the "returns null" behavior of some of the TypeHandler methods, and this causes various error messages to be written to stderr which makes the test case output look unclean and like something has gone wrong when in fact everything is working correctly.

Attached is a patch for this fix. The patch is against http://svn.apache.org/repos/asf/commons/proper/cli/branches/cli-1.x.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
J. Lewis Muir made changes - 27/Sep/08 03:17 PM
Field Original Value New Value
Attachment remove-messages-to-stderr.patch [ 12391082 ]
Emmanuel Bourg made changes - 27/Sep/08 09:16 PM
Component/s CLI-1.x [ 12311672 ]
Component/s Validation [ 12312430 ]
Emmanuel Bourg made changes - 09/Nov/08 09:31 PM
Fix Version/s 1.3 [ 12313321 ]
Priority Major [ 3 ] Minor [ 4 ]
Fix Version/s 1.2 [ 12312674 ]
Issue Type Bug [ 1 ] Improvement [ 4 ]
Henri Yandell made changes - 14/Jan/09 06:12 AM
Fix Version/s 1.3 [ 12313321 ]
Fix Version/s 1.2 [ 12312674 ]
Henri Yandell made changes - 14/Jan/09 06:12 AM
Affects Version/s 1.1 [ 12311979 ]
Affects Version/s 1.2 [ 12312674 ]
Remaining Estimate 0.5h [ 1800 ]
Original Estimate 0.5h [ 1800 ]
Henri Yandell made changes - 14/Jan/09 06:20 AM
Attachment CLI-170.patch [ 12397862 ]
Henri Yandell made changes - 17/Jan/09 08:24 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]