Bugfixes with != instead of equals and default toString calls

This commit is contained in:
vraskulin 2017-02-15 19:52:20 +03:00
parent 752392fc46
commit a15220d51e
74 changed files with 187 additions and 147 deletions

View file

@ -18,6 +18,7 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Collections;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@ -102,7 +103,7 @@ public class UI {
Object o = elem.getAttributes().getAttribute(StyleConstants.NameAttribute);
if (o instanceof HTML.Tag) {
HTML.Tag kind = (HTML.Tag) o;
if (kind == HTML.Tag.IMG) {
if (Objects.equals(kind, HTML.Tag.IMG)) {
return new ImageView(elem) {
@Override
public URL getImageURL() {

View file

@ -296,10 +296,10 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
}
} else if (card.getCardNumber().isEmpty() || "0".equals(card.getCardNumber())) {
System.err.println("There was a critical error!");
logger.error("Card has no collector ID and won't be sent to client: " + card);
logger.error("Card has no collector ID and won't be sent to client: " + card.getName());
} else if (card.getSetCode().isEmpty()) {
System.err.println("There was a critical error!");
logger.error("Card has no set name and won't be sent to client:" + card);
logger.error("Card has no set name and won't be sent to client:" + card.getName());
}
});
numberWithoutTokens = allCards.size();