forked from I2P_Developers/i2p.i2p
rename class
This commit is contained in:
@ -29,7 +29,7 @@ import net.i2p.data.DataFormatException;
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.data.router.RouterAddress;
|
||||
import net.i2p.data.router.RouterInfo;
|
||||
import net.i2p.router.transport.BadCountries;
|
||||
import net.i2p.router.transport.StrictCountries;
|
||||
import net.i2p.router.transport.GeoIP;
|
||||
import net.i2p.util.FileUtil;
|
||||
|
||||
@ -227,7 +227,7 @@ public class BundleRouterInfos {
|
||||
for (Map.Entry<String, String> e : ipMap.entrySet()) {
|
||||
String co = geoIP.get(e.getKey());
|
||||
if (co != null) {
|
||||
if (BadCountries.contains(co)) {
|
||||
if (StrictCountries.contains(co)) {
|
||||
String name = e.getValue();
|
||||
File toFile = new File(toDir, name);
|
||||
if (toFile.delete()) {
|
||||
|
@ -438,7 +438,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
||||
@Override
|
||||
public boolean isInBadCountry() {
|
||||
String us = getOurCountry();
|
||||
return (us != null && BadCountries.contains(us)) || _context.getBooleanProperty("router.forceBadCountry");
|
||||
return (us != null && StrictCountries.contains(us)) || _context.getBooleanProperty("router.forceBadCountry");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -449,7 +449,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
||||
@Override
|
||||
public boolean isInBadCountry(Hash peer) {
|
||||
String c = getCountry(peer);
|
||||
return c != null && BadCountries.contains(c);
|
||||
return c != null && StrictCountries.contains(c);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -463,7 +463,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
||||
if (ip == null)
|
||||
return false;
|
||||
String c = _geoIP.get(ip);
|
||||
return c != null && BadCountries.contains(c);
|
||||
return c != null && StrictCountries.contains(c);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,10 +6,11 @@ import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Maintain a list of bad places.
|
||||
* Maintain a list of countries that may have
|
||||
* tight restrictions on applications like ours.
|
||||
* @since 0.8.13
|
||||
*/
|
||||
public abstract class BadCountries {
|
||||
public abstract class StrictCountries {
|
||||
|
||||
private static final Set<String> _countries;
|
||||
|
Reference in New Issue
Block a user