forked from External/mage
Equals should be compared with == but not equals()
This commit is contained in:
parent
1f9b51d833
commit
d93061c0bc
175 changed files with 348 additions and 344 deletions
|
|
@ -65,7 +65,7 @@ public class CardPanelRenderImpl extends CardPanel {
|
|||
if (a.getRarity() == null || b.getRarity() == null) {
|
||||
return false;
|
||||
}
|
||||
if (!a.getRarity().equals(b.getRarity())) {
|
||||
if (a.getRarity() != b.getRarity()) {
|
||||
return false;
|
||||
}
|
||||
if (a.getCardNumber() != null && !a.getCardNumber().equals(b.getCardNumber())) {
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ public class CardPluginImpl implements CardPlugin {
|
|||
continue;
|
||||
}
|
||||
// all attached permanents are grouped separately later
|
||||
if (!type.equals(RowType.attached) && RowType.attached.isType(permanent)) {
|
||||
if (type != RowType.attached && RowType.attached.isType(permanent)) {
|
||||
continue;
|
||||
}
|
||||
Stack stack = new Stack();
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public class MythicspoilerComSource implements CardImageSource {
|
|||
|
||||
String urlDocument;
|
||||
Document doc;
|
||||
if (proxyType.equals(ProxyType.NONE)) {
|
||||
if (proxyType == ProxyType.NONE) {
|
||||
urlDocument = pageUrl;
|
||||
doc = Jsoup.connect(urlDocument).get();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
Preferences prefs = MageFrame.getPreferences();
|
||||
Connection.ProxyType proxyType = Connection.ProxyType.valueByText(prefs.get("proxyType", "None"));
|
||||
Document doc;
|
||||
if (proxyType.equals(ProxyType.NONE)) {
|
||||
if (proxyType == ProxyType.NONE) {
|
||||
doc = Jsoup.connect(urlString).get();
|
||||
} else {
|
||||
String proxyServer = prefs.get("proxyAddress", "");
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ public final class CardImageUtils {
|
|||
public static Proxy getProxyFromPreferences() {
|
||||
Preferences prefs = MageFrame.getPreferences();
|
||||
Connection.ProxyType proxyType = Connection.ProxyType.valueByText(prefs.get("proxyType", "None"));
|
||||
if (!proxyType.equals(ProxyType.NONE)) {
|
||||
if (proxyType != ProxyType.NONE) {
|
||||
String proxyServer = prefs.get("proxyAddress", "");
|
||||
int proxyPort = Integer.parseInt(prefs.get("proxyPort", "0"));
|
||||
return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyServer, proxyPort));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue