Remove cache module exception

This commit is contained in:
topjohnwu
2017-10-01 01:38:25 +08:00
parent f6bcc84251
commit ab7fd9799d
5 changed files with 21 additions and 37 deletions
@@ -38,9 +38,9 @@ public abstract class BaseModule implements Comparable<BaseModule> {
return values;
}
protected void parseProps(List<String> props) throws CacheModException { parseProps(props.toArray(new String[0])); }
protected void parseProps(List<String> props) { parseProps(props.toArray(new String[0])); }
protected void parseProps(String[] props) throws CacheModException {
protected void parseProps(String[] props) {
for (String line : props) {
String[] prop = line.split("=", 2);
if (prop.length != 2)
@@ -75,9 +75,6 @@ public abstract class BaseModule implements Comparable<BaseModule> {
try {
templateVersion = Integer.parseInt(prop[1]);
} catch (NumberFormatException ignored) {}
case "cacheModule":
if (Boolean.parseBoolean(prop[1]))
throw new CacheModException(mId);
break;
default:
break;
@@ -121,12 +118,6 @@ public abstract class BaseModule implements Comparable<BaseModule> {
return templateVersion;
}
public static class CacheModException extends Exception {
public CacheModException(String id) {
Logger.error("Cache mods are no longer supported! id: " + id);
}
}
@Override
public int compareTo(@NonNull BaseModule module) {
return this.getName().toLowerCase().compareTo(module.getName().toLowerCase());