-
Notifications
You must be signed in to change notification settings - Fork 9
fix(#525): Bug : LNodeTypeAdapter.getDataAttributeRef should not throw exception Multiple Data Attribute found #526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…w exception Multiple Data Attribute found Signed-off-by: massifben <[email protected]>
@@ -14,6 +14,7 @@ | |||
import org.lfenergy.compas.sct.commons.scl.SclRootAdapter; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got 2 test failing in my IDE :
org.lfenergy.compas.sct.commons.scl.dtt.LNodeTypeAdapterTest#testHasSameContentAs
and
org.lfenergy.compas.sct.commons.scl.dtt.DataTypeTemplateAdapterTest#testImportLNodeType
org.lfenergy.compas.sct.commons.scl.dtt.DataTypeTemplateAdapterTest#testImportDTT
.filter(dataAttributeRef -> dataRef.equals(dataAttributeRef.getDataAttributes())) | ||
.reduce((dar1, dar2) -> { | ||
// 2 data attribute ref with the same name in the same LNodeType means the SCL is not valid, according to XSD | ||
throw new ScdException("Multiple Data Attribute found for this data reference '%s' in LNodeType.lnClass=%s, LNodeType.id=%s. Found DA : '%s' ".formatted(dataRef, getLNClass(), getId(), dar1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it tested ?
@@ -195,7 +193,7 @@ public List<DataAttributeRef> getDataAttributeRefs(@NonNull DataAttributeRef fil | |||
} | |||
|
|||
/** | |||
* Return a list of summarized Data Attribute References beginning from given this LNodeType. | |||
* Return a DataAttributeRef beginning from this LNodeType. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good
@@ -41,7 +41,7 @@ | |||
* <li>{@link LNodeTypeAdapter#getId() <em>Returns the value of the <b>id </b>attribute</em>}</li> | |||
* <li>{@link LNodeTypeAdapter#getLNClass <em>Returns the value of the <b>lnClass </b>attribute</em>}</li> | |||
* <li>{@link LNodeTypeAdapter#getDataAttributeRefs(DataAttributeRef)} <em>Returns <b>DataAttributeRef </b> list</em>}</li> | |||
* <li>{@link LNodeTypeAdapter#getDataAttributeRefs(String)} <em>Returns <b>DataAttributeRef </b> list</em>}</li> | |||
* <li>{@link LNodeTypeAdapter#getDataAttributeRef(String)} <em>Returns <b>DataAttributeRef </b> list</em>}</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bof
No description provided.