Skip to content

Commit 50e2af0

Browse files
authored
Merge branch 'main' into dependabot/maven/main/org.junit-junit-bom-6.1.1
2 parents a2f3bed + a1d5213 commit 50e2af0

4 files changed

Lines changed: 26 additions & 22 deletions

File tree

.github/workflows/maven-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
- main-2.x
7+
- main-1.x
88
- '!/refs/heads/dependabot/*'
99
pull_request:
1010
branches:

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@
340340
</plugin>
341341
<plugin>
342342
<artifactId>maven-resources-plugin</artifactId>
343-
<version>3.3.1</version>
343+
<version>3.5.0</version>
344344
</plugin>
345345
<plugin>
346346
<artifactId>maven-source-plugin</artifactId>
@@ -362,7 +362,7 @@
362362
<plugin>
363363
<groupId>org.jacoco</groupId>
364364
<artifactId>jacoco-maven-plugin</artifactId>
365-
<version>0.8.14</version>
365+
<version>0.8.15</version>
366366
<configuration>
367367
<!-- no need to get data about external code. It dramatically reduces performance of JaCoCo for nothing -->
368368
<excludes>
@@ -637,7 +637,7 @@
637637
<plugin>
638638
<groupId>org.apache.maven.plugins</groupId>
639639
<artifactId>maven-site-plugin</artifactId>
640-
<version>3.21.0</version>
640+
<version>3.22.0</version>
641641
</plugin>
642642
<plugin>
643643
<artifactId>maven-surefire-plugin</artifactId>

src/test/java/org/kohsuke/github/AotIntegrationTest.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,20 @@ public void testIfAllRequiredClassesAreRegisteredForAot() throws IOException {
6363
Stream<String> generatedAotConfigClassNames = Stream.concat(generatedReflectConfigStreamOfClassNames,
6464
generatedSerializationStreamOfNames);
6565

66-
generatedAotConfigClassNames.forEach(generatedReflectionConfigClassName -> {
66+
List<String> missingClasses = generatedAotConfigClassNames
67+
.filter(name -> !providedReflectionAndNoReflectionConfigNames.contains(name))
68+
.collect(Collectors.toList());
69+
70+
if (!missingClasses.isEmpty()) {
6771
try {
68-
if (!providedReflectionAndNoReflectionConfigNames.contains(generatedReflectionConfigClassName)) {
69-
fail(String.format(
70-
Files.readString(
71-
Path.of("./target/test-classes/reflection-and-serialization-test-error-message")),
72-
generatedReflectionConfigClassName));
73-
}
72+
String errorTemplate = Files
73+
.readString(Path.of("./target/test-classes/reflection-and-serialization-test-error-message"));
74+
String classList = missingClasses.stream().map(name -> " - " + name).collect(Collectors.joining("\n"));
75+
fail(String.format(errorTemplate, classList));
7476
} catch (IOException e) {
7577
throw new RuntimeException(e);
7678
}
77-
});
79+
}
7880

7981
}
8082

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
The class "%1$s" needs to be configured or excluded for reflection / serialization and was not mentioned in one of the following resources:
1+
The following classes need to be configured or excluded for reflection / serialization:
22

3-
Please do one of the following:
4-
1. add "%1$s" to serialization.json and / or reflect-config.json
5-
2. add "%1$s" to no-reflect-and-serialization-list
3+
%1$s
64

7-
DO NOT do both.
5+
For each class, please do one of the following:
6+
1. add it to serialization.json and / or reflect-config.json
7+
2. add it to no-reflect-and-serialization-list
8+
9+
DO NOT do both.
810

911
Option 1:
10-
The class is serialized or reflected over. Includes "GH*" classes the are populated using Jackson.
11-
Does not include Builders and other classes that are only used locally.
12+
The class is serialized or reflected over. Includes "GH*" classes that are populated using Jackson.
13+
Does not include Builders and other classes that are only used locally.
1214

1315
src/main/resources/META-INF/reflect-config.json - example:
1416

1517
{
16-
"name": "%1$s",
18+
"name": "org.kohsuke.github.GHExample",
1719
"allPublicFields": true,
1820
"allDeclaredFields": true,
1921
"queryAllPublicConstructors": true,
@@ -31,15 +33,15 @@ src/main/resources/META-INF/reflect-config.json - example:
3133
src/main/resources/META-INF/serialization.json - example:
3234

3335
{
34-
"name": "%1$s"
36+
"name": "org.kohsuke.github.GHExample"
3537
}
3638

3739
Option 2:
3840
The class is not serialized or reflected over. This is less common.
3941

4042
src/test/resources/no-reflect-and-serialization-list - example:
4143

42-
%1$s
44+
org.kohsuke.github.GHExample
4345

4446

4547

0 commit comments

Comments
 (0)