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

We don't need the showCraftingLabel flag #3071

Merged
merged 1 commit into from Sep 9, 2017

Conversation

Projects
None yet
3 participants
@fscan
Member

fscan commented Sep 3, 2017

IAEStack is perfectly fine with 0 size stacks.

We don't need the showCraftingLabel flag, as IAEStack is perfectly fi…
…ne with 0 size stacks.

Adjust rendering code to use ItemStack with size 1 where required.

# Conflicts:
#	src/main/java/appeng/client/gui/AEBaseGui.java
#	src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java
if( itemstack.isEmpty() )
{
return null;
}
final AEItemStack item = AEItemStack.create( itemstack );
// item.priority = (int) priority;
item.setStackSize( showCraftingLabel ? 1 : stackSize );
item.setShowCraftingLabel( showCraftingLabel );
item.setStackSize( stackSize );

This comment has been minimized.

@orod-org

orod-org Sep 3, 2017

MAJOR A "NullPointerException" could be thrown; "item" is nullable here. rule

@orod-org

orod-org Sep 3, 2017

MAJOR A "NullPointerException" could be thrown; "item" is nullable here. rule

@orod-org

This comment has been minimized.

Show comment
Hide comment
@orod-org

orod-org Sep 3, 2017

SonarQube analysis reported 4 issues

  • CRITICAL 1 critical
  • MAJOR 3 major

Watch the comments in this conversation to review them.

3 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. CRITICAL AEBaseContainer.java#L223: The Cyclomatic Complexity of this method "setTargetStack" is 11 which is greater than 10 authorized. rule
  2. MAJOR AEFluidStack.java#L154: Remove this useless assignment to local variable "showCraftingLabel". rule
  3. MAJOR AEItemStack.java#L135: A "NullPointerException" could be thrown; "item" is nullable here. rule

orod-org commented Sep 3, 2017

SonarQube analysis reported 4 issues

  • CRITICAL 1 critical
  • MAJOR 3 major

Watch the comments in this conversation to review them.

3 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. CRITICAL AEBaseContainer.java#L223: The Cyclomatic Complexity of this method "setTargetStack" is 11 which is greater than 10 authorized. rule
  2. MAJOR AEFluidStack.java#L154: Remove this useless assignment to local variable "showCraftingLabel". rule
  3. MAJOR AEItemStack.java#L135: A "NullPointerException" could be thrown; "item" is nullable here. rule

@yueh yueh added this to the rv5.alpha - 1.12 milestone Sep 9, 2017

@yueh yueh added the review-accepted label Sep 9, 2017

@fscan fscan merged commit 375e1ef into AppliedEnergistics:rv5-1.12 Sep 9, 2017

2 of 3 checks passed

sonarqube SonarQube reported 4 issues, with 1 critical
continuous-integration/travis-ci/pr 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