Uploaded image for project: 'OASIS Content Management Interoperability Services (CMIS) TC'
  1. OASIS Content Management Interoperability Services (CMIS) TC
  2. CMIS-544

3.2.2.2 getRepositoryInfo outputs, cmisVersionSupported should be a String

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Domain Model
    • Labels:
      None
    • Proposal:
      Hide

      Change datatype (back) to String

      Show
      Change datatype (back) to String

      Description

      "Decimal cmisVersionSupported: A string that indicates..." How do you fit a string into a Decimal type? Since it is decimal, what precision is required? That is, if cmisVersionSupported is 0.63000000000000000444089209850062616169452667236328125, can you say that you support 0.63? This is significant as most decimal numbers can not be represented exactly in floating point representation. This is also why most products represent version numbers as strings.

      • Note - that long number is the result of Java running System.out.println(new BigDecimal(0.63));

      We could argue that the version is specified as something like x.y but not all values of x.y are representable exactly as floating point numbers in binary.

      0.63, for example, can not be represented exactly in single-presision (32 bit) IEEE-754 floating point. It has to be converted to a binary fraction, and it just can't be done with only 32 bits.

      If the TC is going to guarantee that it will always generate specification numbers that are exactly representable in some precision floating point representation, then it should specify the precision is it using, so clients and repositories and future bindings can do the appropriate thing.

      It seems easier to just use a String.

        Attachments

          Activity

            People

            • Assignee:
              ethang Ethan Gur-esh
              Reporter:
              ryan.mcveigh Ryan McVeigh (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: