Skip to content
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

IAEStack#fuzzyComparison now compares the same subtypes. #3384

Merged
merged 1 commit into from May 27, 2018

Conversation

@yueh
Copy link
Member

@yueh yueh commented Feb 10, 2018

To reduce the amount of instanceof checks, it will now compare the same
subtype.
Comparing an ItemStack and IAEItemStack can simply wrap it before
calling it. Heavy use should already use an IAEStack internal.
Analogue for fluids or other types.

@yueh yueh added this to the rv6.alpha - 1.12 milestone Feb 10, 2018
@@ -347,7 +336,7 @@ public Fluid getFluid()
public ItemStack asItemStackRepresentation()
{
// TODO: fluids, how do they even work?

This comment has been minimized.

@orod-org

orod-org Feb 10, 2018

INFO Complete the task associated to this TODO comment. rule

@yueh yueh force-pushed the e-iaestack-fuzzy-compare branch from ea0ff2f to f1bc33e Mar 22, 2018
To reduce the amount of instanceof checks, it will now compare the same
subtupe.
Comparing an ItemStack and IAEItemStack can simply wrap it before
calling it. Heavy use should already use an IAEStack internal.
Analogue for fluids or other types.
@yueh yueh force-pushed the e-iaestack-fuzzy-compare branch from f1bc33e to 0131e6a May 27, 2018
@orod-org
Copy link

@orod-org orod-org commented May 27, 2018

SonarQube analysis reported 4 issues

  • CRITICAL 1 critical
  • MAJOR 2 major
  • INFO 1 info

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 AEFluidStack.java#L288: Reduce the number of conditional operators (11) used in the expression (maximum allowed 3). rule
  2. MAJOR AEFluidStack.java#L288: Remove this expression which always evaluates to "false" rule
  3. MAJOR AEItemStack.java#L103: A "NullPointerException" could be thrown; "item" is nullable here. rule
@yueh yueh merged commit 62435a6 into rv6-1.12 May 27, 2018
3 of 4 checks passed
3 of 4 checks passed
sonarqube SonarQube reported 4 issues, with 1 critical
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 e-iaestack-fuzzy-compare branch Jun 19, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.