Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.6
-
None
-
None
Description
BeanComparator does this:
catch ( Exception e )
{ throw new ClassCastException( e.toString() ); }In my case, it was a getter throwing an exception, so it wasnt a ClassCastException, but BeanComparator threw as such. I couldnt see what the real exception was since the exception was not propagated as cause. I recommend:
catch(Exception e) {
if (e instanceof RuntimeException)
//if this isnt available in the java version you are targetting, the above line will improve things...
throw new RuntimeException(e);
}