Skip to content

Commit

Permalink
Update MapKey error message to reference new auto-value artifacts.
Browse files Browse the repository at this point in the history
This CL updates the error message to reference the new auto-value artifacts.

Fixes #3091

RELNOTES=Fixes #3091: Update MapKey error message to reference new auto-value artifacts.
PiperOrigin-RevId: 416858290
  • Loading branch information
bcorso authored and Dagger Team committed Dec 16, 2021
1 parent 6c45b9d commit 91e7df1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions java/dagger/internal/codegen/validation/MapKeyValidator.java
Expand Up @@ -16,7 +16,6 @@

package dagger.internal.codegen.validation;


import androidx.room.compiler.processing.XAnnotationKt;
import androidx.room.compiler.processing.XMethodElement;
import androidx.room.compiler.processing.XTypeElement;
Expand All @@ -27,9 +26,7 @@
import java.util.List;
import javax.inject.Inject;

/**
* A validator for {@link MapKey} annotations.
*/
/** A validator for {@link MapKey} annotations. */
// TODO(dpb,gak): Should unwrapped MapKeys be required to have their single member be named "value"?
public final class MapKeyValidator {
private final DaggerElements elements;
Expand All @@ -55,7 +52,10 @@ public ValidationReport validate(XTypeElement element) {
} else if (autoAnnotationIsMissing()) {
builder.addError(
"@AutoAnnotation is a necessary dependency if @MapKey(unwrapValue = false). Add a "
+ "dependency on com.google.auto.value:auto-value:<current version>");
+ "dependency for the annotation, "
+ "\"com.google.auto.value:auto-value-annotations:<current version>\", "
+ "and the annotation processor, "
+ "\"com.google.auto.value:auto-value:<current version>\"");
}
return builder.build();
}
Expand Down

0 comments on commit 91e7df1

Please sign in to comment.