Axis2
  1. Axis2
  2. AXIS2-5212

Add getSimpleTypeObject(Class parameter, String text) method to org.apache.axis2.databinding.typemapping.SimpleTypeMapper

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.2, 1.7.0
    • Component/s: databinding
    • Labels:
      None

      Description

      Currently org.apache.axis2.databinding.typemapping.SimpleTypeMapper class has getSimpleTypeObject(Class parameter, OMElement value) method. Only usage of the OMElement parameter of this method is to retrieve the text encapsulated in it by calling value.getText() method. getSimpleTypeObject(Class parameter, String text) would be a more API-wise cleaner version of this method.

      Introducing getSimpleTypeObject(Class parameter, String text) is useful since converting a String into a simple type (int, long, etc.) is a common requirement. In fact, in many places of Apache Synapse project this sort of conversions are done using newly written code. If getSimpleTypeObject(Class parameter, String text) method is introduced to SimpleTypeMapper class, then it can be reused by number of places including some code in Apache Synpase project without writing new code for the same purpose.

      1. AXIS2-5212.patch
        1 kB
        Sadeep Jayasumana

        Issue Links

          Activity

          Hide
          Sadeep Jayasumana added a comment -

          Attaching a patch. Please review and commit.

          Show
          Sadeep Jayasumana added a comment - Attaching a patch. Please review and commit.
          Hide
          Sadeep Jayasumana added a comment -

          I have run all Axis2 tests with this patch. All of them pass without any issues.

          Show
          Sadeep Jayasumana added a comment - I have run all Axis2 tests with this patch. All of them pass without any issues.
          Hide
          Sagara Gunathunga added a comment -

          Patch applied in r1214118.

          Show
          Sagara Gunathunga added a comment - Patch applied in r1214118.
          Hide
          Hudson added a comment -

          Integrated in Axis2 #1180 (See https://builds.apache.org/job/Axis2/1180/)
          Applied patch for AXIS2-5212.

          sagara :
          Files :

          • /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
          Show
          Hudson added a comment - Integrated in Axis2 #1180 (See https://builds.apache.org/job/Axis2/1180/ ) Applied patch for AXIS2-5212 . sagara : Files : /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
          Hide
          Hudson added a comment -

          Integrated in Synapse - Trunk #4336 (See https://builds.apache.org/job/Synapse%20-%20Trunk/4336/)
          Incorporating fixes of AXIS2-5212. (Revision 1363672)

          Result = SUCCESS
          sadeep :
          Files :

          • /synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/bean/BeanUtils.java
          Show
          Hudson added a comment - Integrated in Synapse - Trunk #4336 (See https://builds.apache.org/job/Synapse%20-%20Trunk/4336/ ) Incorporating fixes of AXIS2-5212 . (Revision 1363672) Result = SUCCESS sadeep : Files : /synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/bean/BeanUtils.java

            People

            • Assignee:
              Unassigned
              Reporter:
              Sadeep Jayasumana
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development