forked from External/mage
style: remove some static imports
This commit is contained in:
parent
d61de05eb8
commit
b85d2883e3
11 changed files with 18 additions and 34 deletions
|
|
@ -12,8 +12,6 @@ import java.util.Map;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static mage.cards.decks.CardNameUtil.CARD_NAME_PATTERN;
|
||||
|
||||
/**
|
||||
* Deck import: MTGA official app
|
||||
*/
|
||||
|
|
@ -23,7 +21,7 @@ public class MtgaImporter extends PlainTextDeckImporter {
|
|||
private static final Pattern MTGA_PATTERN = Pattern.compile(
|
||||
"(\\p{Digit}+)" +
|
||||
"\\p{javaWhitespace}+" +
|
||||
"(" + CARD_NAME_PATTERN.pattern() + ")" +
|
||||
"(" + CardNameUtil.CARD_NAME_PATTERN.pattern() + ")" +
|
||||
"(?:\\p{javaWhitespace}+\\()?" +
|
||||
"(\\p{Alnum}+)?" +
|
||||
"(?:\\)\\p{javaWhitespace}+)?" +
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import javax.xml.XMLConstants;
|
|||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.xpath.XPathConstants;
|
||||
import javax.xml.xpath.XPathExpressionException;
|
||||
import javax.xml.xpath.XPathFactory;
|
||||
import java.io.File;
|
||||
|
|
@ -16,8 +17,6 @@ import java.io.IOException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static javax.xml.xpath.XPathConstants.NODESET;
|
||||
|
||||
/**
|
||||
* Deck import: helper class for all xml base formats
|
||||
*/
|
||||
|
|
@ -27,7 +26,7 @@ public abstract class XmlDeckImporter extends DeckImporter {
|
|||
private final DocumentBuilder builder = getDocumentBuilder();
|
||||
|
||||
protected List<Node> getNodes(Document doc, String xpathExpression) throws XPathExpressionException {
|
||||
NodeList nodes = (NodeList) xpathFactory.newXPath().evaluate(xpathExpression, doc, NODESET);
|
||||
NodeList nodes = (NodeList) xpathFactory.newXPath().evaluate(xpathExpression, doc, XPathConstants.NODESET);
|
||||
List<Node> list = new ArrayList<>();
|
||||
for (int i = 0; i < nodes.getLength(); i++) {
|
||||
list.add(nodes.item(i));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue