Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4908

Conversion by annotation does not work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.34, 2.5.14.1
    • Fix Version/s: 2.5.16
    • Component/s: Core
    • Flags:
      Patch

      Description

      It's because of following bugs:

      DefaultConversionAnnotationProcessor.java
      //for properties of classes
      else if (tc.rule() != ConversionRule.ELEMENT || tc.rule() == ConversionRule.KEY || tc.rule() == ConversionRule.COLLECTION)
      

      wrong statement for handling properties (badly imported from DefaultConversionFileProcessor.java).

      XWorkConverter.java
      // Default to the property name
      if (StringUtils.isEmpty(key)) {
      

      should also add prefix to key like what are inside XXX-validation.properties files!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yasser.zamani Yasser Zamani
                Reporter:
                yasser.zamani Yasser Zamani
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: