Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-3183

Cannot set a Double value from a String value

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.LATER
    • 4.2.1
    • None
    • None
    • 1 - Middle term
    • 1 - Easy

      I'm setting a Double value from a String value.
      I'm expected that the String value will be cast to the Double value. But no ! We have a castValue which is not used while trying to write a value. So bad...

      org.ametys.runtime.model.exception.BadItemTypeException: Try to set the non double value '12' to the double data 'nbHours' on 'org.ametys.plugins.repository.data.repositorydata.impl.JCRRepositoryData@456d0b05'
      	at org.ametys.cms.data.type.impl.DoubleRepositoryElementType.write(DoubleRepositoryElementType.java:75)
      	at org.ametys.plugins.repository.data.holder.impl.DefaultModifiableModelAwareDataHolder.setValue(DefaultModifiableModelAwareDataHolder.java:289)
      	at org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject.setValue(ModifiableModelAwareDataAwareAmetysObject.java:63)
      [...]

            cbayle Caroline Bayle
            bmaurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: