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
  • Loading branch information
stuartwdouglas committed Apr 12, 2021
1 parent 851ef0a commit 963358c
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 963358c

Please sign in to comment.