mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
Merge pull request #2868 from kubikrubikvkube/master
Functional interfaces annotation and bugfixes
This commit is contained in:
commit
a1bc43d33e
96 changed files with 215 additions and 157 deletions
|
|
@ -3,7 +3,7 @@ package mage.client.util;
|
|||
/**
|
||||
* @author nantuko
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface Command {
|
||||
|
||||
void execute();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import java.io.Serializable;
|
|||
* @author BetaSteward_at_googlemail.com
|
||||
* @param <E>
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface Listener<E extends Event> extends Serializable {
|
||||
|
||||
void event(E event);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ public class TextboxRule {
|
|||
|
||||
// An attributed region in the text, which can be applied to an
|
||||
// attributed string.
|
||||
@FunctionalInterface
|
||||
public interface AttributeRegion {
|
||||
|
||||
void applyToAttributedString(AttributedString str, Font normal, Font italic);
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue