Dexels / navajo

Navajo Service-oriented Applications
GNU Affero General Public License v3.0
9 stars 5 forks source link

Property getValue vs. getTypedValue and null return values #579

Open roelofkemp opened 3 years ago

roelofkemp commented 3 years ago

It can happen that properties of certain types return null for the getValue, but not for the getTypedValue and the other way around.

Example 1: getValue() == null and getTypedValue() != null for all properties that have a value that is not backed by a string representation (for instance selection properties)

Example 2: getValue() != null and getTypedValue() == null for all properties where the value cannot be parsed into the correct type. For instance an integer that has a string representation that is greater than MAX_INT.

Ideally both methods should return null or both should return not-null.

ghost commented 3 years ago

There are currently ...

ghost commented 3 years ago

I am pausing this issue since changes to the semantics of these functions are inherently risky (given the lack of proper regression tests in the code base).