mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 08:39:12 +00:00
More secure way of null catching
This commit is contained in:
@@ -12,7 +12,6 @@ import java.net.MalformedURLException;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the information for the selected server provider
|
* Gets the information for the selected server provider
|
||||||
@@ -81,7 +80,7 @@ public class ServerProviderInfo {
|
|||||||
if (properties.get("crc32") != null) {
|
if (properties.get("crc32") != null) {
|
||||||
return Long.parseLong(properties.get("crc32"));
|
return Long.parseLong(properties.get("crc32"));
|
||||||
} else {
|
} else {
|
||||||
return (long) new Random().nextInt(2000) + 1;
|
return System.currentTimeMillis() / 1000 / 60 / 60/ 24;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user