NanoContainer
  1. NanoContainer
  2. NANO-139

Workaround for illegal bean properties in XML Configuration

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta-5
    • Fix Version/s: 1.0-RC2
    • Component/s: xml
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      As per discussion on mailing list.
      <java.text.SimpleDateFormat>
      <lenient>false</lenient>
      <2DigitYearStart>date</2DigitYearStart>
      </java.text.SimpleDateFormat>

      Won't parse due to the '2' at the beginning of 2DigitYearStart.

      I added a 'map-to' property in org.nanocontainer.script.xml.BeanComponentInstanceFactory that when present allows for such mapping. So the following would be applicable:

      <java.text.SimpleDateFormat>
      <lenient>false</lenient>
      <yearStart map-to='2DigitYearStart'>date</yearStart>
      </java.text.SimpleDateFormat>

      HTH!
      -Mike (R)

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Component/s core [ 10193 ]
        Fix Version/s 1.0 [ 10148 ]
        Component/s xml [ 11632 ]
        Hide
        Mauro Talevi added a comment -

        Applied patch - renamed attribute to 'name' to specify the property name.

        Show
        Mauro Talevi added a comment - Applied patch - renamed attribute to 'name' to specify the property name.
        Mauro Talevi made changes -
        Fix Version/s 1.0-RC2 [ 11851 ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.0 [ 10148 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael Rimov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: