mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Fixed compile issue that appeared because of commit cleanup
This commit is contained in:
parent
eb88f85467
commit
00bd119481
@ -11,7 +11,6 @@ import com.djrapitops.plan.system.database.databases.sql.tables.move.Version18Tr
|
|||||||
import com.djrapitops.plan.system.settings.Settings;
|
import com.djrapitops.plan.system.settings.Settings;
|
||||||
import com.djrapitops.plugin.api.utility.log.Log;
|
import com.djrapitops.plugin.api.utility.log.Log;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
@ -84,7 +83,7 @@ public class IPAnonPatch extends Patch {
|
|||||||
statement.setString(2, updatedInfo.getIpHash());
|
statement.setString(2, updatedInfo.getIpHash());
|
||||||
statement.setString(3, geoInfo.getIp());
|
statement.setString(3, geoInfo.getIp());
|
||||||
statement.addBatch();
|
statement.addBatch();
|
||||||
} catch (UnknownHostException | UnsupportedEncodingException | NoSuchAlgorithmException e) {
|
} catch (UnknownHostException | NoSuchAlgorithmException e) {
|
||||||
if (Settings.DEV_MODE.isTrue()) {
|
if (Settings.DEV_MODE.isTrue()) {
|
||||||
Log.toLog(this.getClass(), e);
|
Log.toLog(this.getClass(), e);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package com.djrapitops.plan.data.container;
|
|||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
@ -17,7 +16,7 @@ import static org.junit.Assert.assertEquals;
|
|||||||
public class GeoInfoTest {
|
public class GeoInfoTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void automaticallyHidesLast16Bits() throws UnsupportedEncodingException, NoSuchAlgorithmException, UnknownHostException {
|
public void automaticallyHidesLast16Bits() throws NoSuchAlgorithmException, UnknownHostException {
|
||||||
InetAddress test = InetAddress.getByName("1.2.3.4");
|
InetAddress test = InetAddress.getByName("1.2.3.4");
|
||||||
String expected = "1.2.xx.xx";
|
String expected = "1.2.xx.xx";
|
||||||
String result = new GeoInfo(test, "Irrelevant", 3).getIp();
|
String result = new GeoInfo(test, "Irrelevant", 3).getIp();
|
||||||
|
Loading…
Reference in New Issue
Block a user