Skip to content

Commit

Permalink
add missed placeholder for log, delete redundant 'return' clause (apa…
Browse files Browse the repository at this point in the history
…che#5550)

### Motivation

- Adjust code style

### Modifications

- Add the missing placeholder in log statement
- Delete redundant `return clause` for void method
  • Loading branch information
kevenYLi authored and sijie committed Nov 4, 2019
1 parent ec0d4a5 commit cbad217
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ public void run() {
if (stats != null) {
stats.incrSysExceptions(t);
}
return;
} finally {
log.info("Closing instance");
close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,12 @@ public void startFunction(FunctionRuntimeInfo functionRuntimeInfo) {
functionRuntimeInfo.setRuntimeSpawner(runtimeSpawner);

runtimeSpawner.start();
return;
} catch (Exception ex) {
FunctionDetails details = functionRuntimeInfo.getFunctionInstance()
.getFunctionMetaData().getFunctionDetails();
log.info("{}/{}/{} Error starting function", details.getTenant(), details.getNamespace(),
details.getName(), ex);
functionRuntimeInfo.setStartupException(ex);
return;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public void initialize() {
}
}
} catch (Exception e) {
log.error("Failed to initialize function runtime manager: ", e.getMessage(), e);
log.error("Failed to initialize function runtime manager: {}", e.getMessage(), e);
throw new RuntimeException(e);
}
}
Expand Down

0 comments on commit cbad217

Please sign in to comment.