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

debug logging turns on exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.4
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 14620

    Description

      please move the line

      log.debug( ... + bean.getClass()... )

      to a position AFTER the check for ( bean == null ).

      currently, the following code in BeanUtils.java throws an exception when bean == null and logLevel == debug

      --------------------------------------------------

      public static Map describe(Object bean)
      throws IllegalAccessException, InvocationTargetException,
      NoSuchMethodException {

      if (log.isDebugEnabled())

      { log.debug("Describing bean: " + bean.getClass().getName()); }

      if (bean == null)

      { // return (Collections.EMPTY_MAP); return (new java.util.HashMap()); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            bugzilla-apache2@codeguild.com larry h.
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: