mirror of
https://github.com/google/nomulus
synced 2026-01-10 07:57:58 +00: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:
@@ -17,7 +17,9 @@ package google.registry.dns.writer;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import dagger.multibindings.IntoMap;
|
||||
import dagger.multibindings.IntoSet;
|
||||
import dagger.multibindings.StringKey;
|
||||
import javax.inject.Named;
|
||||
|
||||
/** Dagger module that disables DNS updates. */
|
||||
@Module
|
||||
@@ -26,7 +28,14 @@ public final class VoidDnsWriterModule {
|
||||
@Provides
|
||||
@IntoMap
|
||||
@StringKey(VoidDnsWriter.NAME)
|
||||
static DnsWriter provideVoidDnsWriter(VoidDnsWriter writer) {
|
||||
static DnsWriter provideWriter(VoidDnsWriter writer) {
|
||||
return writer;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@IntoSet
|
||||
@Named("dnsWriterNames")
|
||||
static String provideWriterName() {
|
||||
return VoidDnsWriter.NAME;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user