Skip to content

Commit

Permalink
sonarcloud improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
fvolz committed Aug 22, 2024
1 parent 725f8e6 commit 4f5e5bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ public static JpaAssetAdministrationShellDescriptor convertAAS(AssetAdministrati
if (aas == null) {
return null;
}
JpaAssetAdministrationShellDescriptor retval = new JpaAssetAdministrationShellDescriptor.Builder()
return new JpaAssetAdministrationShellDescriptor.Builder()
.from(aas)
.build();
return retval;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,25 +188,21 @@ private AssetAdministrationShellDescriptor fetchAAS(String aasId) {


private static boolean filterAssetType(AssetAdministrationShellDescriptor aas, String assetType) {
boolean retval;
if (assetType == null) {
retval = true;
return true;
}
else {
retval = aas.getAssetType().equals(assetType);
return aas.getAssetType().equals(assetType);
}
return retval;
}


private static boolean filterAssetKind(AssetAdministrationShellDescriptor aas, AssetKind assetKind) {
boolean retval;
if (assetKind == null) {
retval = true;
return true;
}
else {
retval = aas.getAssetKind() == assetKind;
return aas.getAssetKind() == assetKind;
}
return retval;
}
}

0 comments on commit 4f5e5bf

Please sign in to comment.