STARIONGROUP/COMET-SDK-Community-Edition

Computation of the NestedParameter fails if a ValueArray is empty

antoineatstariongroup opened this issue · 6 comments

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of the COMET-SDK
  • I have searched open and closed issues to ensure it has not already been reported

Description

An IndexOutOfRangeException is thrown if on of the ValueArray of the ActualValue is empty.
This is raised line 687 of the NestedElementTreeGenerator

Steps to Reproduce

System Configuration

  • COMET version:
    • CDP4Common:
    • CDP4JsonSerializer:
    • CDP4Dal:
    • CDP4JsonFileDal:
    • CDP4ServicesDal:
    • CDP4WspDal:
    • Other:
  • Environment (Operating system, version and so on):
  • .NET Framework version:
  • Additional information:

what is meant with "empty", as in there is no value (either null or string.empty)?

string.empty. Here is a screen shot of a ParameterValueArray that have been queried via http call
image

seems that the data is incorrect, so, we need to make the algorithm robust against this case, but what is the root cause of this?

It seams that the server allowed to update a ParameterValueSet (For a SimpleQuantityKind) with a string.empty value

It seams that the server allowed to update a ParameterValueSet (For a SimpleQuantityKind) with a string.empty value

can you create a ticket for the server that we do not allow this?