Sling
  1. Sling
  2. SLING-2446

Add support for BigDecimal JCR values

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JCR Resource 2.1.0
    • Component/s: JCR
    • Labels:

      Description

      JCR supports the typehint

      {Decimal}

      for java.math.BigDecimal, but JcrPropertyMap doesn't know about it so doing a map.get(propName, BigDecimal.class) returns null.

      Likewise, you should be able to adapt a Property Resource into a BigDecimal.

        Activity

        Hide
        Justin Edelson added a comment - - edited

        support added to JcrPropertyMap in r1304366

        Show
        Justin Edelson added a comment - - edited support added to JcrPropertyMap in r1304366
        Hide
        Jeff Young added a comment -

        Hi Justin,

        Just to note that I'm working on a patch; should be uploaded in a few hours.

        Cheers,
        Jeff.

        Show
        Jeff Young added a comment - Hi Justin, Just to note that I'm working on a patch; should be uploaded in a few hours. Cheers, Jeff.
        Hide
        Justin Edelson added a comment -

        resolved prematurely. scope should be broadened.

        Show
        Justin Edelson added a comment - resolved prematurely. scope should be broadened.
        Hide
        Justin Edelson added a comment -

        support added to JcrPropertyResource in r1304387

        Show
        Justin Edelson added a comment - support added to JcrPropertyResource in r1304387
        Hide
        Jeff Young added a comment -

        Most of my changes were the same as Justin's, so I just pulled his in. My tests were slightly more complete, however, so I've uploaded a patch containing just my extra tests.

        Show
        Jeff Young added a comment - Most of my changes were the same as Justin's, so I just pulled his in. My tests were slightly more complete, however, so I've uploaded a patch containing just my extra tests.

          People

          • Assignee:
            Justin Edelson
            Reporter:
            Jeff Young
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development