Skip to content

Commit bfd0224

Browse files
committed
[GR-56344] Make all annotation processors claim their annotations
PullRequest: graalpython/3419
2 parents 625a9de + d1d4b57 commit bfd0224

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

graalpython/com.oracle.graal.python.processor/src/com/oracle/graal/python/processor/ArgumentClinicProcessor.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -90,11 +90,7 @@ public class ArgumentClinicProcessor extends AbstractProcessor {
9090

9191
@Override
9292
public Set<String> getSupportedAnnotationTypes() {
93-
HashSet<String> vals = new HashSet<>();
94-
vals.add(ArgumentClinic.class.getName());
95-
vals.add(ArgumentsClinic.class.getName());
96-
vals.add(ClinicConverterFactory.class.getName());
97-
return vals;
93+
return Set.of(ArgumentClinic.class.getName(), ArgumentsClinic.class.getName(), ClinicConverterFactory.class.getName());
9894
}
9995

10096
@Override
@@ -105,7 +101,7 @@ public SourceVersion getSupportedSourceVersion() {
105101
@Override
106102
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
107103
if (roundEnv.processingOver()) {
108-
return false;
104+
return true;
109105
}
110106
try {
111107
ConverterFactory.initBuiltins(processingEnv.getElementUtils());

graalpython/com.oracle.graal.python.processor/src/com/oracle/graal/python/processor/CApiBuiltinsProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ private void checkImports(List<CApiBuiltinDesc> builtins) throws IOException {
836836
@SuppressWarnings({"try", "unused"})
837837
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment re) {
838838
if (re.processingOver()) {
839-
return false;
839+
return true;
840840
}
841841

842842
List<CApiBuiltinDesc> javaBuiltins = new ArrayList<>();

graalpython/com.oracle.graal.python.processor/src/com/oracle/graal/python/processor/GenerateEnumConstantsProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -74,7 +74,7 @@ public SourceVersion getSupportedSourceVersion() {
7474
@SuppressWarnings({"try", "unused"})
7575
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment re) {
7676
if (re.processingOver()) {
77-
return false;
77+
return true;
7878
}
7979
Set<? extends Element> annotatedElements = re.getElementsAnnotatedWith(GenerateEnumConstants.class);
8080
for (Element el : annotatedElements) {

graalpython/com.oracle.graal.python.processor/src/com/oracle/graal/python/processor/SlotsProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public SourceVersion getSupportedSourceVersion() {
8787
@Override
8888
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
8989
if (roundEnv.processingOver()) {
90-
return false;
90+
return true;
9191
}
9292
try {
9393
doProcess(roundEnv);

0 commit comments

Comments
 (0)