rkalla / cloudfront-log-parser

Amazon CloudFront Log Parser
Apache License 2.0
22 stars 6 forks source link

getFieldValue(String fieldName) doesn't need to throw IAE #7

Closed ghost closed 13 years ago

ghost commented 13 years ago

getFieldValue(String fieldName) is currently defined to throw an IllegalArgumentException if fieldName is null or empty; this was done to match the contract of getFieldValue(int fieldIndex), but in this case it is not necessary as null can simply be returned when the fieldName given is incorrect/invalid in any way.

This would also do away with the pre-condition checks.

ghost commented 13 years ago

Fixed.