mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Fix FOSS build
com.google.common.base.Randoms.insecureRandom is not open sourced. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=217598084
This commit is contained in:
parent
f174ec6cd4
commit
82252dfcd6
2 changed files with 3 additions and 4 deletions
|
@ -14,7 +14,6 @@
|
||||||
|
|
||||||
package google.registry.config;
|
package google.registry.config;
|
||||||
|
|
||||||
import static com.google.common.base.Randoms.insecureRandom;
|
|
||||||
import static com.google.common.base.Suppliers.memoize;
|
import static com.google.common.base.Suppliers.memoize;
|
||||||
import static google.registry.config.ConfigUtils.makeUrl;
|
import static google.registry.config.ConfigUtils.makeUrl;
|
||||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
|
@ -1268,7 +1267,7 @@ public final class RegistryConfig {
|
||||||
@Singleton
|
@Singleton
|
||||||
@Provides
|
@Provides
|
||||||
public static Random provideRandom() {
|
public static Random provideRandom() {
|
||||||
return insecureRandom();
|
return new Random();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
|
|
||||||
package google.registry.tmch;
|
package google.registry.tmch;
|
||||||
|
|
||||||
import static com.google.common.base.Randoms.insecureRandom;
|
|
||||||
import static com.google.common.net.HttpHeaders.AUTHORIZATION;
|
import static com.google.common.net.HttpHeaders.AUTHORIZATION;
|
||||||
import static com.google.common.net.HttpHeaders.CONTENT_TYPE;
|
import static com.google.common.net.HttpHeaders.CONTENT_TYPE;
|
||||||
import static com.google.common.net.HttpHeaders.LOCATION;
|
import static com.google.common.net.HttpHeaders.LOCATION;
|
||||||
|
@ -57,6 +56,7 @@ import google.registry.util.TaskQueueUtils;
|
||||||
import google.registry.util.UrlFetchException;
|
import google.registry.util.UrlFetchException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import java.util.Random;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
|
@ -116,7 +116,7 @@ public class NordnUploadActionTest {
|
||||||
action.taskQueueUtils = new TaskQueueUtils(new Retrier(new FakeSleeper(clock), 3));
|
action.taskQueueUtils = new TaskQueueUtils(new Retrier(new FakeSleeper(clock), 3));
|
||||||
action.tld = "tld";
|
action.tld = "tld";
|
||||||
action.tmchMarksdbUrl = "http://127.0.0.1";
|
action.tmchMarksdbUrl = "http://127.0.0.1";
|
||||||
action.random = insecureRandom();
|
action.random = new Random();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue