mirror of
https://github.com/google/nomulus.git
synced 2025-06-01 02:04:04 +02:00
Fix NPE in registry_tool when creating or updating a TLD with a dns writer
I forgot to inject the CreateTldCommand/UpdateTldCommand commands, which now need to be injected so that the list of available DnsWriter implementations is instantiated. This CL also adds a new DI Set<String> with just the name of the writer, so that the instantiated writer map (which may have many DI dependencies) doesn't need to be pulled in. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=130042215
This commit is contained in:
parent
0cab13e6d8
commit
e55ed209c5
6 changed files with 58 additions and 21 deletions
|
@ -17,8 +17,10 @@ package google.registry.dns.writer.dnsupdate;
|
|||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import dagger.multibindings.IntoMap;
|
||||
import dagger.multibindings.IntoSet;
|
||||
import dagger.multibindings.StringKey;
|
||||
import google.registry.dns.writer.DnsWriter;
|
||||
import javax.inject.Named;
|
||||
import javax.net.SocketFactory;
|
||||
|
||||
/** Dagger module that provides a DnsUpdateWriter. */
|
||||
|
@ -33,7 +35,14 @@ public abstract class DnsUpdateWriterModule {
|
|||
@Provides
|
||||
@IntoMap
|
||||
@StringKey(DnsUpdateWriter.NAME)
|
||||
static DnsWriter provideDnsUpdateWriter(DnsUpdateWriter writer) {
|
||||
static DnsWriter provideWriter(DnsUpdateWriter writer) {
|
||||
return writer;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@IntoSet
|
||||
@Named("dnsWriterNames")
|
||||
static String provideWriterName() {
|
||||
return DnsUpdateWriter.NAME;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue