# Bug in adl-parser **Category:** [Reference Implementation: Java (archive)](https://discourse.openehr.org/c/reference-implementation-java-archive/154) **Created:** 2009-08-28 07:50 UTC **Views:** 1 **Replies:** 2 **URL:** https://discourse.openehr.org/t/bug-in-adl-parser/14926 --- ## Post #1 by @Soheil_Hassas_Yegane Hi There, There is a bug in adl-parser project about the existence of archetypes nodes. If a node exists with cardinality {0..*}, it is implicit that the node is OPTIONAL, but the parser consider it as REQUIRED. For example relationships is not necessary as defined in the following line but the ADLParser mark it as required. relationships cardinality matches {0..*; ordered} matches { The problem can be solved simply. Please find the patch attached. Bests, Soheil [details="(attachments)"] [adl.jj.patch|attachment](upload://pNaRVUDOJ2WWXDkZsVoqaxUJlJM.patch) (873 Bytes) [/details] --- ## Post #2 by @system Hi Soheil, Actually the parser is correct as is\. Cardinality \{0\.\.\*\} doesn't mean existence is optional\. Cardinality and existence describe two different constraints here\. A container attribute can be required \(existence matches \{1\}\) and has from 0 to many members\. Cheers, Rong --- ## Post #3 by @Soheil_Hassas_Yegane Hi Rong, I got it and sorry for the inconvenience\. This is the matter null \(optional\) and empty \(required but 0 in size\)\. Bests, Soheil --- **Canonical:** https://discourse.openehr.org/t/bug-in-adl-parser/14926 **Original content:** https://discourse.openehr.org/t/bug-in-adl-parser/14926