mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Merge pull request #7030 from BrunoChevalier/master
Additional fixes for pvs-studio report, see #7021 * Rename BasicSaheekiSublimeArtificerTest.java to BasicSaheeliSublimeArtificerTest.java * S3Uploader.java: Remove redundant null check * Effects.java: remove redundant check. When in the else part, the lastRule already is guaranteed to not end on a dot * TableController.java: change warning message when match == null to avoid nullpointer exception * Reverted already fixed line from, see #7021 Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
This commit is contained in:
commit
5831ba81fc
3 changed files with 10 additions and 10 deletions
|
@ -21,7 +21,7 @@ public class S3Uploader {
|
||||||
|
|
||||||
if (accessKeyId == null || accessKeyId.isEmpty()
|
if (accessKeyId == null || accessKeyId.isEmpty()
|
||||||
|| secretKeyId == null || secretKeyId.isEmpty()
|
|| secretKeyId == null || secretKeyId.isEmpty()
|
||||||
|| existingBucketName == null || existingBucketName.isEmpty()) {
|
|| existingBucketName.isEmpty()) {
|
||||||
logger.info("Aborting json log sync.");
|
logger.info("Aborting json log sync.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -975,7 +975,7 @@ public class TableController {
|
||||||
if (!(table.getState() == TableState.WAITING || table.getState() == TableState.STARTING || table.getState() == TableState.READY_TO_START)) {
|
if (!(table.getState() == TableState.WAITING || table.getState() == TableState.STARTING || table.getState() == TableState.READY_TO_START)) {
|
||||||
if (match == null) {
|
if (match == null) {
|
||||||
logger.warn("- Match table with no match:");
|
logger.warn("- Match table with no match:");
|
||||||
logger.warn("-- matchId:" + match.getId() + " , table : " + table.getId());
|
logger.warn("-- match: null , table : " + table.getId());
|
||||||
// return false;
|
// return false;
|
||||||
} else if (match.isDoneSideboarding() && match.getGame() == null) {
|
} else if (match.isDoneSideboarding() && match.getGame() == null) {
|
||||||
// no sideboarding and not active game -> match seems to hang (maybe the Draw bug)
|
// no sideboarding and not active game -> match seems to hang (maybe the Draw bug)
|
||||||
|
|
|
@ -15,7 +15,7 @@ import org.mage.test.serverside.base.CardTestOathbreaker3PlayersFFA;
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class BasicSaheekiSublimeArtificerTest extends CardTestOathbreaker3PlayersFFA {
|
public class BasicSaheeliSublimeArtificerTest extends CardTestOathbreaker3PlayersFFA {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check that if a player left the game, it's commander is also removed
|
* Check that if a player left the game, it's commander is also removed
|
||||||
|
@ -35,7 +35,7 @@ public class BasicSaheekiSublimeArtificerTest extends CardTestOathbreaker3Player
|
||||||
assertCommandZoneCount(playerA, "Thoughtcast", 0);
|
assertCommandZoneCount(playerA, "Thoughtcast", 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void castCommanderTest() {
|
public void castCommanderTest() {
|
||||||
|
|
||||||
|
@ -44,18 +44,18 @@ public class BasicSaheekiSublimeArtificerTest extends CardTestOathbreaker3Player
|
||||||
|
|
||||||
// Planeswalker 5 Loyality Counter
|
// Planeswalker 5 Loyality Counter
|
||||||
// Whenever you cast a noncreature spell, create a 1/1 colorless Servo artifact creature token.
|
// Whenever you cast a noncreature spell, create a 1/1 colorless Servo artifact creature token.
|
||||||
// -2: Target artifact you control becomes a copy of another target artifact or creature you control until end of turn,
|
// -2: Target artifact you control becomes a copy of another target artifact or creature you control until end of turn,
|
||||||
// except it's an artifact in addition to its other types.
|
// except it's an artifact in addition to its other types.
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Saheeli, Sublime Artificer"); // Planeswalker 5 {1}{U/R}{U/R}
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Saheeli, Sublime Artificer"); // Planeswalker 5 {1}{U/R}{U/R}
|
||||||
|
|
||||||
// Affinity for artifacts
|
// Affinity for artifacts
|
||||||
// Draw two cards.
|
// Draw two cards.
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Thoughtcast"); // Sorcery {4}{U}
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Thoughtcast"); // Sorcery {4}{U}
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.DECLARE_ATTACKERS);
|
setStopAt(1, PhaseStep.DECLARE_ATTACKERS);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
|
|
||||||
assertCommandZoneCount(playerB, "Saheeli, Sublime Artificer", 1);
|
assertCommandZoneCount(playerB, "Saheeli, Sublime Artificer", 1);
|
||||||
assertCommandZoneCount(playerB, "Thoughtcast", 1);
|
assertCommandZoneCount(playerB, "Thoughtcast", 1);
|
||||||
assertCommandZoneCount(playerC, "Saheeli, Sublime Artificer", 1);
|
assertCommandZoneCount(playerC, "Saheeli, Sublime Artificer", 1);
|
||||||
|
@ -66,4 +66,4 @@ public class BasicSaheekiSublimeArtificerTest extends CardTestOathbreaker3Player
|
||||||
assertCommandZoneCount(playerA, "Thoughtcast", 1);
|
assertCommandZoneCount(playerA, "Thoughtcast", 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue