Issue Details (XML | Word | Printable)

Key: VALIDATOR-226
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Niall Pemberton
Reporter: Lian Ort
Votes: 0
Watchers: 0
Operations

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

Null-Stream input to ValidatorResources leads to MalformedURLExceptions

Created: 26/Feb/07 04:33 PM   Updated: 12/Nov/07 07:25 PM
Return to search
Component/s: Framework
Affects Version/s: 1.3.1 Release
Fix Version/s: 1.4

Time Tracking:
Not Specified

Environment: Should be regardless to OS or Java version

Resolution Date: 26/Feb/07 05:19 PM


 Description  « Hide
Providing the constructor of ValidatorResources with a null InputStream leads to a MalformedURLException,
which leads the user (trying to find his error) in a complete wrong direction. Perhaps returning a NullPointerException or
an IllegalArgumentException seems to be a better understandable reaction.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #511908 Mon Feb 26 17:12:37 UTC 2007 niallp Fix for VALIDATOR-226 - Null-Stream input to ValidatorResources leads to MalformedURLExceptions - thanks to Lian Ort
Files Changed
ADD /jakarta/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/ValidatorResourcesTest.java
MODIFY /jakarta/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/ValidatorTestSuite.java
MODIFY /jakarta/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/ValidatorResources.java
MODIFY /jakarta/commons/proper/validator/trunk/xdocs/changes.xml

Niall Pemberton added a comment - 26/Feb/07 05:19 PM
Thanks for reporting this - I've fixed this in validator (now throws an IllegalArgumentException indicating that the InputStream is null).

I also created an issue for this against Commons Digester (DIGESTER-111) - which also failed to check that the InputStream isn't null.

Niall


Niall Pemberton made changes - 26/Feb/07 05:19 PM
Field Original Value New Value
Assignee Niall Pemberton [ niallp ]
Fix Version/s 1.4 [ 12312009 ]
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Henri Yandell made changes - 12/Nov/07 07:25 PM
Status Resolved [ 5 ] Closed [ 6 ]