File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
native-maven-plugin/src/functionalTest/groovy/org/graalvm/buildtools/maven Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,14 @@ class SBOMFunctionalTest extends AbstractGraalVMMavenFunctionalTest {
170
170
assert mainComponentDependency.get('dependsOn').isEmpty()
171
171
172
172
// Check that the main component is not found in " components"
173
- assert !rootNode.get('components').any { it.get('bom-ref').asText() == mainComponentId }
173
+ assert !rootNode.get('components').any { component ->
174
+ def bomRef = component.get('bom-ref')
175
+ if (!bomRef) {
176
+ return false
177
+ }
178
+ def bomRefValue = bomRef instanceof String ? bomRef : bomRef.asText()
179
+ bomRefValue == mainComponentId
180
+ }
174
181
175
182
return true
176
183
} catch (AssertionError | Exception e) {
You can’t perform that action at this time.
0 commit comments