Misc checkstyle fixes

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-04-14 12:34:43 +10:00
parent 5833b4d35c
commit 18886036f4
72 changed files with 149 additions and 151 deletions

View File

@@ -41,7 +41,7 @@ public class FactoryItemMaterialTest extends AbstractTestingBase {
return buffer.delete(0, Integer.MAX_VALUE).append(from.getClass().getName()).append('(').append(from.name()).append(") to ").append(to.getClass().getName()).append('(').append(to.name()).append(')').toString();
}
@Parameters(name="Material[{index}]:{0}")
@Parameters(name = "Material[{index}]:{0}")
public static List<Object[]> data() {
List<Object[]> list = new ArrayList<Object[]>();
for (Material material : materials) {

View File

@@ -19,7 +19,7 @@ import org.junit.runners.Parameterized.Parameters;
public class ItemMetaImplementationOverrideTest {
static final Class<CraftMetaItem> parent = CraftMetaItem.class;
@Parameters(name="[{index}]:{1}")
@Parameters(name = "[{index}]:{1}")
public static List<Object[]> data() {
final List<Object[]> testData = new ArrayList<Object[]>();
List<Class<? extends CraftMetaItem>> classes = new ArrayList<Class<? extends CraftMetaItem>>();

View File

@@ -56,22 +56,22 @@ public class ItemMetaTest extends AbstractTestingBase {
static final int MAX_FIREWORK_POWER = 127; // Please update ItemStackFireworkTest if/when this gets changed.
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testPowerLimitExact() {
newFireworkMeta().setPower(MAX_FIREWORK_POWER + 1);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testPowerLimitMax() {
newFireworkMeta().setPower(Integer.MAX_VALUE);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testPowerLimitMin() {
newFireworkMeta().setPower(Integer.MIN_VALUE);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testPowerLimitNegative() {
newFireworkMeta().setPower(-1);
}

View File

@@ -13,7 +13,7 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ItemStackBookTest extends ItemStackTest {
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
public static List<Object[]> data() {
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.WRITTEN_BOOK, Material.WRITABLE_BOOK);
}

View File

@@ -14,7 +14,7 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ItemStackEnchantStorageTest extends ItemStackTest {
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
public static List<Object[]> data() {
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.ENCHANTED_BOOK);
}

View File

@@ -16,7 +16,7 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ItemStackFireworkChargeTest extends ItemStackTest {
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
public static List<Object[]> data() {
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.FIREWORK_STAR);
}

View File

@@ -16,7 +16,7 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ItemStackFireworkTest extends ItemStackTest {
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
public static List<Object[]> data() {
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.FIREWORK_ROCKET);
}

View File

@@ -14,7 +14,7 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ItemStackLeatherTest extends ItemStackTest {
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
public static List<Object[]> data() {
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.LEATHER_BOOTS, Material.LEATHER_CHESTPLATE, Material.LEATHER_HELMET, Material.LEATHER_LEGGINGS);
}

View File

@@ -14,7 +14,7 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ItemStackLoreEnchantmentTest extends ItemStackTest {
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
public static List<Object[]> data() {
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, ItemStackTest.COMPOUND_MATERIALS);
}

View File

@@ -13,7 +13,7 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ItemStackMapTest extends ItemStackTest {
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
public static List<Object[]> data() {
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.FILLED_MAP);
}

View File

@@ -14,7 +14,7 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ItemStackPotionsTest extends ItemStackTest {
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
public static List<Object[]> data() {
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.POTION);
}

View File

@@ -13,7 +13,7 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ItemStackSkullTest extends ItemStackTest {
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
public static List<Object[]> data() {
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.PLAYER_HEAD);
}

View File

@@ -305,7 +305,7 @@ public class ItemStackTest extends AbstractTestingBase {
}
}
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
public static List<Object[]> data() {
return ImmutableList.of(); // TODO, test basic durability issues
}