https://issues.apache.org/bugzilla/show_bug.cgi?id=55330
--- Comment #3 from Ryan O'Meara <[email protected]> --- I meant to ask if you'd want to see a patch for all or a patch for one to see if you liked how I went about it - guess that answers that question! I will work up a patch for one of the better defined cases (I'm thinking margins - there are only so many valid options for that one) and we can discuss based on that. There are a couple of different techniques I'd suggest for the invalid value scenario - we can either include an "unknown value" enum (throwing an exception if its attempted as an input) to cover those cases, or we can throw an exception during parsing if we are confident that we have covered all values. It shouldn't be too hard t nail down the values for most of these - they generally say right in the docs "must be on of (list of constants)", which is what made me think enumerations would be a better fit for this area. If the function is only meant to accept a certain range of values, it would be better to use Java's built-in type safety to help support it instead of accidentally letting values through or throwing exceptions at run time. So, current plan: - Scrub the file format documentation for the possible valid margin arguments - Check the example/test documents for commonly used margin values - Create an enumeration of those values, containing the data necessary to convert them to the file format data - Create a patch and attach to this bug for discussion By the way, at the moment, I have checked out the source using Git. Will a patch created via Git work, or should I check out the source via SVN and create a patch using that? -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
