Merge pull request #1912 from thatsIch/e-replace-with-array-initializer

Replace with array initializer
This commit is contained in:
yueh
2015-09-26 11:56:44 +02:00
26 changed files with 47 additions and 47 deletions
+4 -4
View File
@@ -59,9 +59,9 @@ public final class AEConfig extends Configuration implements IConfigurableObject
public static AEConfig instance;
public final IConfigManager settings = new ConfigManager( this );
public final EnumSet<AEFeature> featureFlags = EnumSet.noneOf( AEFeature.class );
public final int[] craftByStacks = new int[] { 1, 10, 100, 1000 };
public final int[] priorityByStacks = new int[] { 1, 10, 100, 1000 };
public final int[] levelByStacks = new int[] { 1, 10, 100, 1000 };
public final int[] craftByStacks = { 1, 10, 100, 1000 };
public final int[] priorityByStacks = { 1, 10, 100, 1000 };
public final int[] levelByStacks = { 1, 10, 100, 1000 };
private final double WirelessHighWirelessCount = 64;
private final File configFile;
public int storageBiomeID = -1;
@@ -98,7 +98,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
public boolean updatable = false;
public double meteoriteClusterChance = 0.1;
public double meteoriteSpawnChance = 0.3;
public int[] meteoriteDimensionWhitelist = new int[] { 0 };
public int[] meteoriteDimensionWhitelist = { 0 };
public int craftingCalculationTimePerTick = 5;
PowerUnits selectedPowerUnit = PowerUnits.AE;
private double WirelessBaseCost = 8;
+2 -2
View File
@@ -284,10 +284,10 @@ public class ApiPart implements IPartHelper
defineClassMethod.setAccessible( true );
try
{
Object[] argsA = new Object[] { name, name, b };
Object[] argsA = { name, name, b };
b = (byte[]) runTransformersMethod.invoke( loader, argsA );
Object[] args = new Object[] { name, b, 0, b.length };
Object[] args = { name, b, 0, b.length };
clazz = (Class) defineClassMethod.invoke( loader, args );
}
finally
@@ -108,7 +108,7 @@ public class BlockDefinition extends ItemDefinition implements IBlockDefinition
{
try
{
Object[] itemCtorArgs = new Object[] {};
Object[] itemCtorArgs = {};
Class<?>[] ctorArgClasses = new Class<?>[itemCtorArgs.length + 1];
ctorArgClasses[0] = Block.class;
for( int idx = 1; idx < ctorArgClasses.length; idx++ )