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

Switch to new IItemHandler #3669

Merged
merged 1 commit into from Oct 4, 2018

Conversation

Projects
None yet
3 participants
@fscan
Member

fscan commented Aug 5, 2018

*) Remove the hack for isValidItem
*) Remove markDirty(), needs some testing if slots still work as expected.

We should wait for a new RB before merging this.

import appeng.util.inv.filter.IAEItemFilter;
public class AppEngCellInventory implements IInternalItemHandler
public class AppEngCellInventory implements IItemHandlerModifiable
{
private final AppEngInternalInventory inv;
private final ICellInventoryHandler handlerForSlot[];

This comment has been minimized.

@orod-org

orod-org Aug 5, 2018

MINOR Move the array designator from the variable to the type. rule

@@ -100,7 +100,7 @@ public boolean isItemValidForSlot( int slot, ItemStack stack )
ItemStack is = Api.INSTANCE.definitions().items().dummyFluidItem().maybeStack( 1 ).get();

This comment has been minimized.

@orod-org

orod-org Aug 5, 2018

MAJOR Call "Optional#isPresent()" before accessing the value. rule

@orod-org

This comment has been minimized.

orod-org commented Aug 5, 2018

SonarQube analysis reported 20 issues

  • BLOCKER 1 blocker
  • CRITICAL 12 critical
  • MAJOR 6 major
  • MINOR 1 minor

Watch the comments in this conversation to review them.

Top 10 extra 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 AppEngCellInventory.java#: Add or update the header of this file. rule
  2. CRITICAL AEBaseContainer.java#L410: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  3. CRITICAL AEBaseContainer.java#L684: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  4. CRITICAL AEBaseContainer.java#L696: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  5. CRITICAL AEBaseContainer.java#L707: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  6. CRITICAL AEBaseContainer.java#L747: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  7. CRITICAL AEBaseContainer.java#L817: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  8. CRITICAL AEBaseContainer.java#L841: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  9. CRITICAL AEBaseContainer.java#L845: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  10. CRITICAL AEBaseContainer.java#L953: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule

@yueh yueh force-pushed the feature-new-itemhandler branch from 5e7a16d to 7b4a41c Oct 4, 2018

@yueh yueh merged commit d88f550 into rv6-1.12 Oct 4, 2018

4 checks passed

SonarCloud Code Quality check passed; 0.0% New code coverage; 0.4% Est. post-merge coverage
Details
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment