Skip to content

Commit 7354343

Browse files
committed
Fix recursive property identification logic to also handle recursive properties, which are not optional
Signed-off-by: Johannes Kristan <[email protected]>
1 parent 2cd1a6c commit 7354343

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/sds-aspect-model-aas-generator/src/main/java/io/openmanufacturing/sds/aspectmodel/aas/AspectModelAASVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ private SubmodelElement map( final Property property, final Context context ) {
229229
recursiveProperty.remove( property );
230230
if ( property.isOptional() ) {
231231
LOG.warn( String.format( "Having a recursive Property %s which is optional. Will be excluded from AAS mapping.", property ) );
232-
return defaultResultForProperty.get();
233232
} else {
234-
throw new IllegalArgumentException( String.format( "Having a recursive Property: %s which is not optional is not valid.", property ) );
233+
LOG.error( String.format( "Having a recursive Property: %s which is not optional is not valid. Check the model. Property will be excluded from AAS mapping.", property ) );
235234
}
235+
return defaultResultForProperty.get();
236236
}
237237
recursiveProperty.add( property );
238238

0 commit comments

Comments
 (0)