[ https://issues.apache.org/jira/browse/GIRAPH-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13215955#comment-13215955 ]
Jakob Homan commented on GIRAPH-87: ----------------------------------- Looks good except it fails checkstyle: {noformat}<file name="/Users/jhoman/repos/giraph/src/main/java/org/apache/giraph/graph/BspService.java"> <error line="587" severity="error" message="Line matches the illegal pattern 'Trailing whitespace'." source="com.puppycrawl.tools.checkstyle.checks.RegexpCheck"/> <error line="587" column="5" severity="error" message="'}' should be on the same line." source="com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck"/> <error line="588" severity="error" message="Line matches the illegal pattern 'Trailing whitespace'." source="com.puppycrawl.tools.checkstyle.checks.RegexpCheck"/> </file>{noformat} Kill the trailing spaces and move the else to the same line and we're good to go. > Simplify boolean expression in BspService::checkpointFrequencyMet > ----------------------------------------------------------------- > > Key: GIRAPH-87 > URL: https://issues.apache.org/jira/browse/GIRAPH-87 > Project: Giraph > Issue Type: Improvement > Affects Versions: 0.2.0 > Reporter: Jakob Homan > Assignee: Eli Reisman > Labels: newbie > Attachments: GIRAPH-87.patch > > > {noformat} if (superstep < firstCheckpoint) { > return false; > } else if (((superstep - firstCheckpoint) % checkpointFrequency) == > 0) { > return true; > } else { > return false; > }{noformat} > can be simplified to just return the result of the else if evaluation. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira