Skip to content

Commit 7fa4f6f

Browse files
mai93copybara-github
authored andcommitted
[2021.1 compat] Use raw PairProcessor as parameter for PatternConditionPlus#processValues
The API for `PatternConditionPlus#processValues` changed to take wildcard generics (PairProcessor<? super Value, ? super ProcessingContext> instead of PairProcessor<Value, ProcessingContext>) in [this commit](JetBrains/intellij-community@bb440db#diff-84c9e84629ba27c39287fb6c8630c7a61fe77d835a96eafad33f0790de09079c). To make this work across both API levels, we use PairProcessor as a raw parameter. PiperOrigin-RevId: 375055419
1 parent 0f12b0a commit 7fa4f6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java/src/com/google/idea/blaze/java/lang/build/references/JavaClassQualifiedNameReference.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,16 @@ public class JavaClassQualifiedNameReference
4646
psiElement(Keyword.class)
4747
.with(nameCondition(StandardPatterns.string().oneOf(JAVA_CLASS_STRING_TYPES))));
4848

49+
// #api203: remove "@SuppressWarnings({"rawtypes", "RedundantSuppression"})"
50+
@SuppressWarnings({"rawtypes", "RedundantSuppression"})
4951
private static PatternCondition<PsiElementBase> nameCondition(final ElementPattern<?> pattern) {
5052
return new PatternConditionPlus<PsiElementBase, String>("_withPsiName", pattern) {
5153
@Override
5254
public boolean processValues(
5355
PsiElementBase t,
5456
ProcessingContext context,
55-
PairProcessor<String, ProcessingContext> processor) {
57+
// #api203 replace with "PairProcessor<? super String, ? super ProcessingContext>"
58+
PairProcessor processor) {
5659
return processor.process(t.getName(), context);
5760
}
5861
};

0 commit comments

Comments
 (0)