# maybe strange code-construct in DvOrdered used with DvDateTime? (also other combinations are possible) **Category:** [Reference Implementation: Java (archive)](https://discourse.openehr.org/c/reference-implementation-java-archive/154) **Created:** 2009-04-13 08:50 UTC **Views:** 2 **Replies:** 2 **URL:** https://discourse.openehr.org/t/maybe-strange-code-construct-in-dvordered-used-with-dvdatetime-also-other-combinations-are-possible/13267 --- ## Post #1 by @system Hi Rong, Ik would be happy, if you can spare some time coming days to look at following question Thanks, Bert When DvDateTime is constructed with only a string, which is possible\! Then normalstatus and normalrange will not be set\. When function "isNormal" is used an exception will be raised: "Both normalRange and normalStatus null" I wonder if that is a good combination, allowing to construct an object in one way, but then raising an exception when it is used in its normal functionality\. Also, in the constructor of DvOrdered there is an empty\-if statement, which looks like a left over, in an experiment about how to handle the NormalRange and normalStatus question\. --- ## Post #2 by @system Hi Bert, Sorry for the delay\. Must have been occupied with something else when you raised this\. I will look into the issues you reported\. But now we will have to fix them in release 1\.0\.2 ;\-\) Cheers, Rong --- ## Post #3 by @system > Hi Bert, > > Sorry for the delay\. Must have been occupied with something else when > you raised this\. I will look into the issues you reported\. But now we > will have to fix them in release 1\.0\.2 ;\-\) I repaired it like this: if\(normalRange==null\) return true; else \{   return getNormalRange\(\)\.has\(this\); \} I know this is not elegant, but I couldn't think of another solution, but in my code an Exception at this place was difficult to handle\. It is, I think, a bit of a flaw in a more architectural way of thinking\. Bert --- **Canonical:** https://discourse.openehr.org/t/maybe-strange-code-construct-in-dvordered-used-with-dvdatetime-also-other-combinations-are-possible/13267 **Original content:** https://discourse.openehr.org/t/maybe-strange-code-construct-in-dvordered-used-with-dvdatetime-also-other-combinations-are-possible/13267