Skip to content

Commit

Permalink
Remove unreachable return. (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
CamaradeRoman authored Jun 3, 2024
1 parent f200421 commit b8c93eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .run/DmsServiceApplication (dev).run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<option name="value" value="false" />
</param>
</additionalParameters>
<module name="dms-service.dms.main" />
<module name="octopus-dms-service.dms-service.main" />
<option name="SPRING_BOOT_MAIN_CLASS" value="org.octopusden.octopus.dms.DmsServiceApplication" />
<extension name="coverage">
<pattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,16 @@ class AdminServiceImpl( //TODO: move functionality to ComponentService and Artif
}

/**
* Check if component with name [newName] exists in components registry
* Check if component with name [name] exists in components registry
* @param name - the component name
* @return true if component with name [newName] exists in components registry
* @return true if component with name [name] exists in components registry
*/
private fun isComponentPresentInRegistry(name: String): Boolean {
return try{
componentsRegistryService.getComponent(name)
return true
} catch (e: ComponentsRegistryNotFoundException) {
log.info("Component with name $name not found in components registry")
return false
}
private fun isComponentPresentInRegistry(name: String) = try {
componentsRegistryService.getComponent(name)
true
} catch (e: ComponentsRegistryNotFoundException) {
log.info("Component with name $name not found in components registry")
false
}

companion object {
Expand Down

0 comments on commit b8c93eb

Please sign in to comment.