mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Cleanup - .equals("") -> .isEmpty()
This commit is contained in:
@@ -185,14 +185,14 @@ public class ImageCache {
|
||||
}
|
||||
if (altState)
|
||||
imageKey = imageKey.substring(0, imageKey.length() - ImageKeys.BACKFACE_POSTFIX.length());
|
||||
if (!specColor.equals(""))
|
||||
if (!specColor.isEmpty())
|
||||
imageKey = imageKey.substring(0, imageKey.length() - ImageKeys.SPECFACE_W.length());
|
||||
if (imageKey.startsWith(ImageKeys.CARD_PREFIX)) {
|
||||
ipc = ImageUtil.getPaperCardFromImageKey(imageKey);
|
||||
if (ipc != null) {
|
||||
if (altState) {
|
||||
imageKey = ipc.getCardAltImageKey();
|
||||
} else if (!specColor.equals("")) {
|
||||
} else if (!specColor.isEmpty()) {
|
||||
switch (specColor) {
|
||||
case "white":
|
||||
imageKey = ipc.getCardWSpecImageKey();
|
||||
|
||||
@@ -518,7 +518,7 @@ public class DeckImport<TModel extends DeckBase> extends FDialog {
|
||||
// we set it to the current one (if any) or set a new one.
|
||||
// In this way, if this deck will replace the current one, the name will be kept the same!
|
||||
if (!deck.hasName()){
|
||||
if (currentDeckName.equals(""))
|
||||
if (currentDeckName.isEmpty())
|
||||
deck.setName(Localizer.getInstance().getMessage("lblNewDeckName"));
|
||||
else
|
||||
deck.setName(currentDeckName);
|
||||
|
||||
@@ -102,7 +102,7 @@ public class DeckController<T extends DeckBase> {
|
||||
newModel();
|
||||
isStored = false;
|
||||
} else
|
||||
isStored = !this.modelPath.equals("");
|
||||
isStored = !this.modelPath.isEmpty();
|
||||
} else {
|
||||
CardPool catalogClone = new CardPool(view.getInitialCatalog());
|
||||
deck = pickFromCatalog(deck, catalogClone);
|
||||
|
||||
@@ -94,7 +94,7 @@ public final class FImageUtil {
|
||||
PaperCard card = ImageUtil.getPaperCardFromImageKey(key);
|
||||
if (altState) {
|
||||
imageKey = card.getCardAltImageKey();
|
||||
} else if (!specColor.equals("")) {
|
||||
} else if (!specColor.isEmpty()) {
|
||||
switch (specColor) {
|
||||
case "white":
|
||||
imageKey = card.getCardWSpecImageKey();
|
||||
@@ -119,7 +119,7 @@ public final class FImageUtil {
|
||||
if(altState) {
|
||||
imageKey = imageKey.substring(0, imageKey.length() - ImageKeys.BACKFACE_POSTFIX.length());
|
||||
imageKey += "full.jpg";
|
||||
} else if (!specColor.equals("")) {
|
||||
} else if (!specColor.isEmpty()) {
|
||||
imageKey = imageKey.substring(0, imageKey.length() - ImageKeys.SPECFACE_W.length());
|
||||
imageKey += "full.jpg";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user