Skip to content

Commit

Permalink
Make sure class is only processed once
Browse files Browse the repository at this point in the history
Note that at present we are processing more
classes than are strictly nessesary, however
the proper fix for this requires some changes
that are part of my continous testing branch.

Fixes quarkusio#16347

(cherry picked from commit 963358c)
  • Loading branch information
stuartwdouglas authored and gsmet committed Apr 13, 2021
1 parent 9014b28 commit 2689395
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@ void transformerBuildItem(BuildProducer<BytecodeTransformerBuildItem> transforme
Files.deleteIfExists(Paths.get(dataFile));

Instrumenter instrumenter = new Instrumenter(new OfflineInstrumentationAccessGenerator());
Set<String> seen = new HashSet<>();
for (ClassInfo i : indexBuildItem.getIndex().getKnownClasses()) {
String className = i.name().toString();
if (seen.contains(className)) {
continue;
}
seen.add(className);
transformers.produce(
new BytecodeTransformerBuildItem.Builder().setClassToTransform(className)
.setCacheable(true)
Expand Down

0 comments on commit 2689395

Please sign in to comment.