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

PropertyUtils.describe() returns wrong fields names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.7.0
    • 1.8.0
    • Bean / Property Utils
    • None
    • WinXP SP2

    Description

      I have the following bean:

      public class SumTestBean2 {
      private int iVal;
      public int getIVal()

      { return iVal; }

      public void setIVal(int val)

      { iVal = val; }

      }

      ... and the following snippet of code:

      SumTestBean2 stb = new SumTestBean2();
      stb.setIVal(12);
      Map map = PropertyUtils.describe(stb);
      for(Object o : map.keySet()) System.out.println(o);

      .. prints out the following:
      IVal
      class
      ====
      Note that instead of "IVal" there should be "iVal" - uppercase letter appears instead of lowercase.
      This happens only when field has first letter - in lower case followed by uppercase letter.

      Attachments

        Activity

          People

            bayard Henri Yandell
            legga Oleg Timoshenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: