Skip to content

Conversation

@martafullen
Copy link
Contributor

Added a neutral copyright to .cs, .ps1 and .razor files.
Added a neutral copyright to .bat files (experimental).

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

}
}

if (!assetIds.IsNullOrEmpty())

Check warning

Code scanning / CodeQL

Dereferenced variable may be null

Variable [assetIds](1) may be null at this access because the parameter has a null default value. Variable [assetIds](1) may be null at this access because the parameter has a null default value.
Comment on lines +286 to +299
if (aas != null)
{
if (aas.AssetInformation != null)
{
if (aas.AssetInformation.DefaultThumbnail != null && !string.IsNullOrEmpty(aas.AssetInformation.DefaultThumbnail.Path))
{
_packageEnvService.DeleteAssetInformationThumbnail(packageIndex, aas.AssetInformation.DefaultThumbnail);
}
else
{
throw new NotFoundException($"No default thumbnail embedded in the AssetInformation of the requested AAS.");
}
}
}

Check notice

Code scanning / CodeQL

Nested 'if' statements can be combined

These 'if' statements can be combined.
Comment on lines +87 to +94
foreach (var submodelReference in aas.Submodels)
{
if (submodelReference.Matches(body))
{
found = true;
break;
}
}

Check notice

Code scanning / CodeQL

Missed opportunity to use Where

This foreach loop [implicitly filters its target sequence](1) - consider filtering the sequence explicitly using '.Where(...)'.
Comment on lines +400 to +404
foreach (var submodelReference in aas.Submodels)
{
if (submodelReference.GetAsExactlyOneKey().Value.Equals(submodelIdentifier))
{ return true; }
}

Check notice

Code scanning / CodeQL

Missed opportunity to use Where

This foreach loop [implicitly filters its target sequence](1) - consider filtering the sequence explicitly using '.Where(...)'.
private readonly IAdminShellPackageEnvironmentService _packageEnvService;
private readonly IMetamodelVerificationService _verificationService;
private readonly ISubmodelService _submodelService;
private AdminShellPackageEnv[] _packages;

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity

Field '_packages' can be 'readonly'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants