--- On Fri, 2/12/10, Adam Heath <[email protected]> wrote: > It's also why I throw UnsupportedOperationException, > instead of > ConversionException, during convert(obj). You > shouldn't do doing > unknown conversions, when dealing with enums. In > those cases, you > should know that an enum is being requested, and use the > other convert > method.
But the client code is checking for ConversionException, and typically takes an alternate path when one is thrown. Throwing UnsupportedOperationException breaks that pattern.
