forked from I2P_Developers/i2p.i2p
Fix NPE from URL->URI conversion
new URL(null) throws MUE new URI(null) throws NPE
This commit is contained in:
@@ -875,11 +875,13 @@ public class TrackerClient implements Runnable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ann an announce URL
|
||||
* @param ann an announce URL, may be null, returns false if null
|
||||
* @return true for i2p hosts only
|
||||
* @since 0.7.12
|
||||
*/
|
||||
public static boolean isValidAnnounce(String ann) {
|
||||
if (ann == null)
|
||||
return false;
|
||||
URI url;
|
||||
try {
|
||||
url = new URI(ann);
|
||||
|
Reference in New Issue
Block a user