Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-8

BeanComparator compare method throws ClassCastException regardless of underlying exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Nightly Builds
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 18835

    Description

      Here's the code from the end of the compare method:

      catch ( Exception e )

      { throw new ClassCastException( e.toString() ); }

      Regardless of the underlying exception, this will throw a ClassCastException
      with the message of the exception thrown.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--BeanComparator.java
          11 kB
          Tim O'Brien
        2. ASF.LICENSE.NOT.GRANTED--BeanComparator.java
          11 kB
          Tim O'Brien
        3. ASF.LICENSE.NOT.GRANTED--BeanComparatorTestCase.java
          12 kB
          Tim O'Brien
        4. ASF.LICENSE.NOT.GRANTED--patch.txt
          9 kB
          Tim O'Brien
        5. ASF.LICENSE.NOT.GRANTED--patch.txt
          9 kB
          Tim O'Brien

        Activity

          People

            Unassigned Unassigned
            tobrien@discursive.com Tim O'Brien
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: