Skip to content

Commit

Permalink
Merge pull request #382 from smallrye/dependabot/maven/org.codehaus.p…
Browse files Browse the repository at this point in the history
…lexus-plexus-compiler-eclipse-2.15.0

Bump org.codehaus.plexus:plexus-compiler-eclipse from 2.11.1 to 2.15.0
  • Loading branch information
Ladicek authored May 27, 2024
2 parents aedd662 + a30a02b commit 8eda8bf
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 22 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
- 11
- 17
- 21
- 22-ea
- 22
# not yet supported by Groovy
#- 23-ea
compiler:
- javac
- ecj
Expand All @@ -40,6 +42,8 @@ jobs:
exclude:
- java: 8
compiler: ecj
- java: 11
compiler: ecj
runs-on: ${{ matrix.os }}
name: "JDK ${{ matrix.java }}, ${{ matrix.compiler}}, params: ${{ matrix.parameters }}, ${{ matrix.os }}"
steps:
Expand All @@ -55,7 +59,7 @@ jobs:
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.8.7
maven-version: 3.9.7

- name: Build with Maven
shell: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void test() throws IOException {
assertEquals(1, clazz.declaredAnnotationsWithRepeatable(myAnn, index).size());
assertEquals(3, clazz.declaredAnnotations().size());
verify(clazz.declaredAnnotations(), myAnn, "c1");
assertEquals(CompiledWith.ecj() ? 14 : 9, clazz.annotationsWithRepeatable(myRepAnn, index).size());
assertEquals(9, clazz.annotationsWithRepeatable(myRepAnn, index).size());
assertEquals(3, clazz.declaredAnnotationsWithRepeatable(myRepAnn, index).size());
verify(clazz.declaredAnnotationsWithRepeatable(myRepAnn, index), myRepAnn, "cr1", "cr2", "cr3");
}
Expand All @@ -103,7 +103,7 @@ public void test() throws IOException {
assertEquals(1, field.declaredAnnotationsWithRepeatable(myAnn, index).size());
assertEquals(3, field.declaredAnnotations().size());
verify(field.declaredAnnotations(), myAnn, "f1");
assertEquals(CompiledWith.ecj() ? 8 : 3, field.annotationsWithRepeatable(myRepAnn, index).size());
assertEquals(3, field.annotationsWithRepeatable(myRepAnn, index).size());
assertEquals(3, field.declaredAnnotationsWithRepeatable(myRepAnn, index).size());
verify(field.declaredAnnotationsWithRepeatable(myRepAnn, index), myRepAnn, "fr1", "fr2", "fr3");
}
Expand Down
16 changes: 3 additions & 13 deletions core/src/test/java/org/jboss/jandex/test/BasicTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -673,19 +673,9 @@ private void verifyDummy(Index index, boolean v2features) {
assertEquals(0, nestedParamAnnotated.position());
assertTrue(nestedParamAnnotated.hasAnnotation(DotName.createSimple(ParameterAnnotation.class.getName())));
assertNotNull(nestedParamAnnotated.annotation(DotName.createSimple(ParameterAnnotation.class.getName())));
if (!CompiledWith.ecj()) {
// javac DOESN'T put the annotation on the _type_ of the parameter
assertEquals(1, nestedParamAnnotated.annotations().size());
assertTrue(nestedParamAnnotated.type().annotations().isEmpty());
assertNull(nestedParamAnnotated.type().annotation(DotName.createSimple(ParameterAnnotation.class.getName())));
} else {
// ecj DOES put the annotation on the _type_ of the parameter, contrary to the `@Target` declaration
assertEquals(2, nestedParamAnnotated.annotations().size());
assertTrue(
nestedParamAnnotated.type().hasAnnotation(DotName.createSimple(ParameterAnnotation.class.getName())));
assertNotNull(
nestedParamAnnotated.type().annotation(DotName.createSimple(ParameterAnnotation.class.getName())));
}
assertEquals(1, nestedParamAnnotated.annotations().size());
assertTrue(nestedParamAnnotated.type().annotations().isEmpty());
assertNull(nestedParamAnnotated.type().annotation(DotName.createSimple(ParameterAnnotation.class.getName())));

ClassInfo enumClass = index.getClassByName(DotName.createSimple(Enum.class.getName()));
assertNotNull(enumClass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,19 @@ public void test() throws IOException {
// on the _types_ of `AnnotatedClassN.field` and `method`, contrary to the `@Target` declarations

annotations = index.getAnnotations(MyRepeatableAnnotation.DOT_NAME);
assertEquals(CompiledWith.ecj() ? 11 : 5, annotations.size());
assertEquals(5, annotations.size());
for (AnnotationInstance annotation : annotations) {
assertFalse(annotation.value().asString().startsWith("XXX"));
}

annotations = index.getAnnotations(MyRepeatableAnnotation.List.DOT_NAME);
assertEquals(CompiledWith.ecj() ? 5 : 3, annotations.size());
assertEquals(3, annotations.size());
for (AnnotationInstance annotation : annotations) {
assertFalse(annotation.value().asString().startsWith("XXX"));
}

annotations = index.getAnnotationsWithRepeatable(MyRepeatableAnnotation.DOT_NAME, index);
assertEquals(CompiledWith.ecj() ? 21 : 11, annotations.size());
assertEquals(11, annotations.size());
for (AnnotationInstance annotation : annotations) {
assertFalse(annotation.value().asString().startsWith("XXX"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ private void test(Index index, Class<?> clazz) {
assertNotNull(classInfo);
assertEquals(clazz.getName(), classInfo.name().toString());

{
if (!CompiledWith.ecj()) {
// ecj does NOT put the type annotation on the extended type
assertEquals(
"org.jboss.jandex.test.@TypeAnn(\"local:extends\") TypeAnnotationOnLocalClassTypeTest$InnerClass$1LocalClass",
classInfo.superClassType().toString());
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<version.maven-shade-plugin>3.5.1</version.maven-shade-plugin>
<version.nexus-staging-maven-plugin>1.6.13</version.nexus-staging-maven-plugin>
<version.mvn-jlink-wrapper>1.1.1</version.mvn-jlink-wrapper>
<version.plexus-compiler-eclipse>2.11.1</version.plexus-compiler-eclipse>
<version.plexus-compiler-eclipse>2.15.0</version.plexus-compiler-eclipse>
<version.plexus-utils>4.0.0</version.plexus-utils>
</properties>

Expand Down

0 comments on commit 8eda8bf

Please sign in to comment.