Merge branch 'master' into add-minimum-rating-option

This commit is contained in:
Aaron Miller 2018-09-29 19:15:46 -07:00
commit 5cd57199c7
348 changed files with 1560 additions and 1096 deletions

View file

@ -39,7 +39,7 @@ public class ActionData {
this.gameId = gameId;
}
public class CustomExclusionStrategy implements ExclusionStrategy {
static class CustomExclusionStrategy implements ExclusionStrategy {
// FIXME: Very crude way of whitelisting, as it applies to all levels of the JSON tree.
private final java.util.Set<String> KEEP = new java.util.HashSet<>(

View file

@ -2,6 +2,7 @@ package mage.utils.properties;
import org.apache.log4j.Logger;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
@ -19,39 +20,36 @@ public final class PropertiesUtil {
private static Properties properties = new Properties();
static {
InputStream in = PropertiesUtil.class.getResourceAsStream("/xmage.properties");
if (in != null) {
try {
properties.load(in);
} catch (IOException e) {
logger.error("Couldn't load properties", e);
}
} else {
try (InputStream in = PropertiesUtil.class.getResourceAsStream("/xmage.properties")) {
properties.load(in);
} catch (FileNotFoundException fnfe) {
logger.warn("No xmage.properties were found on classpath");
} catch (IOException e) {
logger.error("Couldn't load properties");
e.printStackTrace();
}
}
/**
* Hide constructor
*/
/**
* Hide constructor
*/
private PropertiesUtil() {
}
public static String getDBLogUrl() {
String url = properties.getProperty(PropertyKeys.KEY_DB_LOG_URL, LOG_JDBC_URL);
if (url != null) {
return url.trim();
}
return null;
}
public static String getDBFeedbackUrl() {
String url = properties.getProperty(PropertyKeys.KEY_DB_FEEDBACK_URL, FEEDBACK_JDBC_URL);
if (url != null) {
return url.trim();
public static String getDBLogUrl () {
String url = properties.getProperty(PropertyKeys.KEY_DB_LOG_URL, LOG_JDBC_URL);
if (url != null) {
return url.trim();
}
return null;
}
public static String getDBFeedbackUrl () {
String url = properties.getProperty(PropertyKeys.KEY_DB_FEEDBACK_URL, FEEDBACK_JDBC_URL);
if (url != null) {
return url.trim();
}
return null;
}
return null;
}
}