- CheckStyle.

This commit is contained in:
Chris
2012-02-29 20:13:35 +00:00
parent 220970b27a
commit e2b750d064
7 changed files with 20 additions and 16 deletions

View File

@@ -71,7 +71,9 @@ public final class CardUtil {
* @return a {@link forge.Card} object.
*/
public static <T> T getRandom(final T[] o) {
if ( o == null ) throw new IllegalArgumentException("CardUtil : getRandom(T) recieved null instead of array.");
if (o == null) {
throw new IllegalArgumentException("CardUtil : getRandom(T) recieved null instead of array.");
}
int len = o.length;
switch(len) {
case 0: throw new IllegalArgumentException("CardUtil : getRandom(T) recieved an empty array.");

View File

@@ -227,7 +227,7 @@ public class ComputerAIGeneral implements Computer {
}
/**
* Returns the spellAbilities from the card list
* Returns the spellAbilities from the card list.
*
* @param l
* a {@link forge.CardList} object.

View File

@@ -199,8 +199,9 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
@Override
public final void setCards(final Iterable<Card> cards) {
List<Card> toSet = new ArrayList<Card>();
for(Card c : cards)
for (Card c : cards) {
toSet.add(c);
}
this.setCardList(toSet);
this.update();
}

View File

@@ -353,12 +353,13 @@ public class PlayerZoneComesIntoPlay extends DefaultPlayerZone {
// Battlefield filters out Phased Out cards by default. Needs to call
// getCards(false) to get Phased Out cards
if (!filter)
if (!filter) {
return new ArrayList<Card>(this.getCardList());
}
final ArrayList<Card> list = new ArrayList<Card>();
for(Card crd : this.getCardList())
{
for (Card crd : this.getCardList()) {
if (!crd.isPhasedOut()) {
list.add(crd);
}