diff --git a/persistence/jpa/src/main/java/de/fraunhofer/iosb/ilt/faaast/registry/jpa/util/ModelTransformationHelper.java b/persistence/jpa/src/main/java/de/fraunhofer/iosb/ilt/faaast/registry/jpa/util/ModelTransformationHelper.java index 73e4352..8e46628 100644 --- a/persistence/jpa/src/main/java/de/fraunhofer/iosb/ilt/faaast/registry/jpa/util/ModelTransformationHelper.java +++ b/persistence/jpa/src/main/java/de/fraunhofer/iosb/ilt/faaast/registry/jpa/util/ModelTransformationHelper.java @@ -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; } diff --git a/persistence/memory/src/main/java/de/fraunhofer/iosb/ilt/faaast/registry/memory/AasRepositoryMemory.java b/persistence/memory/src/main/java/de/fraunhofer/iosb/ilt/faaast/registry/memory/AasRepositoryMemory.java index d7676d7..cd22695 100644 --- a/persistence/memory/src/main/java/de/fraunhofer/iosb/ilt/faaast/registry/memory/AasRepositoryMemory.java +++ b/persistence/memory/src/main/java/de/fraunhofer/iosb/ilt/faaast/registry/memory/AasRepositoryMemory.java @@ -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; } }