Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-3313

ADB Boolean type mapping incorrect for '1' and '0'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3
    • None
    • adb
    • None

    Description

      The values of 1 and 0 are not being mapped to the corresponding true and false boolean values for a pojo web service. The problem is that in the SimpleTypeMapper class the value for the boolean is got from:

      Boolean.valueOf(value.getText())

      This doesn't account for 1's or 0's and should be changed to
      :

      if(value.getText().equals("1"))

      return new Boolean(true);

      else if(value.getText().equals("0"))

      return new Boolean(false);

      else

      return Boolean.valueOf(value.getText());

      Since a 1 should map to true and a 0 should map to false. It needs to be changed for both java.lang.Boolean objects and simple booleans

      Attachments

        Activity

          People

            amilachinthaka Amila Chinthaka Suriarachchi
            bneate Brian Neate
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: