Skip to content

Commit

Permalink
Simplify lambda.
Browse files Browse the repository at this point in the history
  • Loading branch information
khatchad committed Apr 8, 2024
1 parent ce556df commit ad59ac0
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,9 @@ public CAstNode visitImport(Import imp) throws Exception {
public CAstNode visitImportFrom(ImportFrom importFrom) throws Exception {
Optional<String> s =
importFrom.getInternalModuleNames().stream()
.map(
n -> {
return n.getInternalId();
})
.reduce(
(a, b) -> {
return a + "/" + b;
});
.map(Name::getInternalId)
.reduce((a, b) -> a + "/" + b);

if (s.isPresent()) {
String moduleName = s.get();
LOGGER.finer("Module name from " + importFrom + " is: " + moduleName + ".");
Expand Down

0 comments on commit ad59ac0

Please sign in to comment.