New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactors grid connections #3219

Merged
merged 5 commits into from Nov 12, 2017

Conversation

Projects
None yet
2 participants
@yueh
Member

yueh commented Nov 12, 2017

Extracted all checks and subsequent updates to a factory method from the
constructor.
Reordered checks to check for nulls before anything else.
Also existing connections before security breaks.
Fixes TileController#checkController() using the wrong position.
Added debug logging for failed connections.

yueh added some commits Nov 12, 2017

Refactors grid connections
Extracted all checks and subsequent updates to a factory method from the
constructor.
Reordered checks to check for nulls before anything else.
Also existing connections before security breaks.
Fixes TileController#checkController() using the wrong position.
Added debug logging for failed connections.
Further improvements
Improved logging.
Inversed boolean so false no longer means security check passed.
@orod-org

This comment has been minimized.

Show comment
Hide comment
@orod-org

orod-org Nov 12, 2017

SonarQube analysis reported 10 issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. BLOCKER Platform.java#L1409: Refactor this method to not always return the same value. rule
  2. MAJOR GridNode.java#L634: A "List" cannot contain a "IPathItem" rule
  3. MAJOR Platform.java#L576: Remove this useless assignment to local variable "itemStack". rule
  4. MAJOR Platform.java#L621: Remove this useless assignment to local variable "itemStack". rule
  5. MAJOR Platform.java#L1415: Call "Optional#isPresent()" before accessing the value. rule
  6. MAJOR Platform.java#L1419: Call "Optional#isPresent()" before accessing the value. rule
  7. MAJOR Platform.java#L1614: This block of commented-out lines of code should be removed. rule
  8. MINOR TileController.java#L158: Immediately return this expression instead of assigning it to the temporary variable "leftOver". rule
  9. MINOR Platform.java#L433: Remove this use of "getDrops"; it is deprecated. rule
  10. MINOR Platform.java#L1188: Remove this unnecessary cast to "T". rule

orod-org commented Nov 12, 2017

SonarQube analysis reported 10 issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. BLOCKER Platform.java#L1409: Refactor this method to not always return the same value. rule
  2. MAJOR GridNode.java#L634: A "List" cannot contain a "IPathItem" rule
  3. MAJOR Platform.java#L576: Remove this useless assignment to local variable "itemStack". rule
  4. MAJOR Platform.java#L621: Remove this useless assignment to local variable "itemStack". rule
  5. MAJOR Platform.java#L1415: Call "Optional#isPresent()" before accessing the value. rule
  6. MAJOR Platform.java#L1419: Call "Optional#isPresent()" before accessing the value. rule
  7. MAJOR Platform.java#L1614: This block of commented-out lines of code should be removed. rule
  8. MINOR TileController.java#L158: Immediately return this expression instead of assigning it to the temporary variable "leftOver". rule
  9. MINOR Platform.java#L433: Remove this use of "getDrops"; it is deprecated. rule
  10. MINOR Platform.java#L1188: Remove this unnecessary cast to "T". rule

@yueh yueh merged commit e0bf722 into rv5-1.12 Nov 12, 2017

3 of 4 checks passed

sonarqube SonarQube reported 10 issues, with 1 blocker
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
jenkins Success
Details

@yueh yueh deleted the fix-grid-connections branch Nov 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment