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

Replaced LinkedList with ArrayList or ArrayDeque when applicable. #3392

Merged
merged 1 commit into from May 27, 2018

Conversation

Projects
None yet
2 participants
@yueh
Member

yueh commented Feb 17, 2018

No description provided.

@yueh yueh added this to the rv6.alpha - 1.12 milestone Feb 17, 2018

@@ -84,7 +84,7 @@
public abstract class AEBaseGui extends GuiContainer
{
private final List<InternalSlotME> meSlots = new LinkedList<>();
private final List<InternalSlotME> meSlots = new ArrayList<>();
// drag y
private final Set<Slot> drag_click = new HashSet<>();

This comment has been minimized.

@orod-org

orod-org Feb 17, 2018

MINOR Rename this field "drag_click" to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

@@ -252,15 +253,15 @@ public FluidStack drain( int maxDrain, boolean doDrain )
if( s == null )
{
DEPTH.set( s = new LinkedList<>() );
DEPTH.set( s = new ArrayDeque<>() );

This comment has been minimized.

@orod-org

orod-org Feb 17, 2018

MAJOR Extract the assignment out of this expression. rule

@@ -215,7 +215,7 @@ public void cellUpdate( final MENetworkCellArrayUpdate ev )
{
this.storageNetworks.clear();
final List<ICellProvider> ll = new LinkedList<ICellProvider>();
final List<ICellProvider> ll = new ArrayList<ICellProvider>();

This comment has been minimized.

@orod-org

orod-org Feb 17, 2018

MINOR Replace the type specification in this constructor call with the diamond operator ("<>"). rule

@@ -39,8 +40,8 @@
private final HashSet<Block> blacklisted = new HashSet<>();
private final HashMap<Class<? extends TileEntity>, IMovableHandler> Valid = new HashMap<>();

This comment has been minimized.

@orod-org

orod-org Feb 17, 2018

MINOR Rename this field "Valid" to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

@@ -44,7 +44,7 @@
public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
{
private final Map<String, Class<? extends ICraftHandler>> handlers = new HashMap<>( 20 );
private final Collection<ISubItemResolver> resolvers = new LinkedList<>();
private final Collection<ISubItemResolver> resolvers = new ArrayList<>();
@Override
public void addNewCraftHandler( final String name, final Class<? extends ICraftHandler> handler )

This comment has been minimized.

@orod-org

orod-org Feb 17, 2018

MINOR Remove this use of "ICraftHandler"; it is deprecated. rule

@@ -44,7 +44,7 @@
public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
{
private final Map<String, Class<? extends ICraftHandler>> handlers = new HashMap<>( 20 );

This comment has been minimized.

@orod-org

orod-org Feb 17, 2018

MINOR Remove this use of "ICraftHandler"; it is deprecated. rule

@yueh yueh force-pushed the e-phase-out-linkedlists branch from 4b58c30 to a0b7eaa Mar 22, 2018

@yueh yueh force-pushed the e-phase-out-linkedlists branch from a0b7eaa to 587c794 May 27, 2018

@orod-org

This comment has been minimized.

orod-org commented May 27, 2018

SonarQube analysis reported 85 issues

  • BLOCKER 1 blocker
  • CRITICAL 23 critical
  • MAJOR 30 major
  • MINOR 30 minor
  • INFO 1 info

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 PacketMEInventoryUpdate.java#L85: Use try-with-resources or close this "GZIPInputStream" in a "finally" clause. rule
  2. CRITICAL AEBaseGui.java#L244: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  3. CRITICAL DualityInterface.java#L623: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  4. CRITICAL DualityInterface.java#L632: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  5. CRITICAL DualityInterface.java#L695: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  6. CRITICAL DualityInterface.java#L953: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  7. CRITICAL DualityInterface.java#L1004: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  8. CRITICAL ItemMaterial.java#L90: The Cyclomatic Complexity of this method "addCheckedInformation" is 11 which is greater than 10 authorized. rule
  9. CRITICAL ItemMaterial.java#L217: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule
  10. CRITICAL ItemMaterial.java#L223: Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule

@yueh yueh merged commit d7b97fa into rv6-1.12 May 27, 2018

3 of 4 checks passed

sonarqube SonarQube reported 85 issues, with 23 critical and 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 e-phase-out-linkedlists branch Jun 19, 2018

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