wonook commented on a change in pull request #247: Fix SonarCloud bugs related
to Optional
URL: https://github.com/apache/incubator-nemo/pull/247#discussion_r339324941
##########
File path:
compiler/optimizer/src/main/java/org/apache/nemo/compiler/optimizer/pass/compiletime/annotating/DefaultParallelismPass.java
##########
@@ -124,7 +124,8 @@ static Integer recursivelySynchronizeO2OParallelism(final
IRDAG dag, final IRVer
.mapToInt(inVertex -> recursivelySynchronizeO2OParallelism(dag,
inVertex, parallelism))
.max().orElse(1);
final Integer maxParallelism = ancestorParallelism > parallelism ?
ancestorParallelism : parallelism;
- final Integer myParallelism =
vertex.getPropertyValue(ParallelismProperty.class).get();
+ final Integer myParallelism =
vertex.getPropertyValue(ParallelismProperty.class)
+ .orElseThrow(() -> new RuntimeException("No ParallelismProperty for the
vertex " + vertex.getId()));
Review comment:
Same here
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services