mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Fix some warnings reported by Eclipse.
This commit is contained in:
@@ -543,7 +543,6 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
movedCard = game.getAction().moveTo(destination, tgtC);
|
movedCard = game.getAction().moveTo(destination, tgtC);
|
||||||
// If a card is Exiled from the stack, remove its spells from the stack
|
// If a card is Exiled from the stack, remove its spells from the stack
|
||||||
if (sa.hasParam("Fizzle")) {
|
if (sa.hasParam("Fizzle")) {
|
||||||
final FCollectionView<SpellAbility> spells = tgtC.getSpellAbilities();
|
|
||||||
if (tgtC.isInZone(ZoneType.Exile) || tgtC.isInZone(ZoneType.Hand) || tgtC.isInZone(ZoneType.Stack)) {
|
if (tgtC.isInZone(ZoneType.Exile) || tgtC.isInZone(ZoneType.Hand) || tgtC.isInZone(ZoneType.Stack)) {
|
||||||
// This only fizzles spells, not anything else.
|
// This only fizzles spells, not anything else.
|
||||||
game.getStack().remove(tgtC);
|
game.getStack().remove(tgtC);
|
||||||
|
|||||||
@@ -1010,15 +1010,21 @@ public class ImportDialog {
|
|||||||
destFile.createNewFile();
|
destFile.createNewFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileInputStream srcStream = null;
|
||||||
FileChannel src = null;
|
FileChannel src = null;
|
||||||
|
FileOutputStream destStream = null;
|
||||||
FileChannel dest = null;
|
FileChannel dest = null;
|
||||||
try {
|
try {
|
||||||
src = new FileInputStream(srcFile).getChannel();
|
srcStream = new FileInputStream(srcFile);
|
||||||
dest = new FileOutputStream(destFile).getChannel();
|
src = srcStream.getChannel();
|
||||||
|
destStream = new FileOutputStream(destFile);
|
||||||
|
dest = destStream.getChannel();
|
||||||
dest.transferFrom(src, 0, src.size());
|
dest.transferFrom(src, 0, src.size());
|
||||||
} finally {
|
} finally {
|
||||||
if (src != null) { src.close(); }
|
if (src != null) { src.close(); }
|
||||||
|
if (srcStream != null) { srcStream.close(); }
|
||||||
if (dest != null) { dest.close(); }
|
if (dest != null) { dest.close(); }
|
||||||
|
if (destStream != null) { destStream.close(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deleteSrcAfter) {
|
if (deleteSrcAfter) {
|
||||||
|
|||||||
Reference in New Issue
Block a user