HHH-16462 Share the same Jandex Indexer while indexing different files
This commit is contained in:
parent
eece96bb12
commit
99da69fdc1
|
@ -41,9 +41,11 @@ public class ClassFileArchiveEntryHandler implements ArchiveEntryHandler {
|
|||
};
|
||||
|
||||
private final ScanResultCollector resultCollector;
|
||||
private final Indexer indexer;
|
||||
|
||||
public ClassFileArchiveEntryHandler(ScanResultCollector resultCollector) {
|
||||
this.resultCollector = resultCollector;
|
||||
this.indexer = new Indexer();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,7 +62,6 @@ public class ClassFileArchiveEntryHandler implements ArchiveEntryHandler {
|
|||
|
||||
private ClassDescriptor toClassDescriptor(ArchiveEntry entry) {
|
||||
try (InputStream inputStream = entry.getStreamAccess().accessInputStream()) {
|
||||
Indexer indexer = new Indexer();
|
||||
ClassSummary classSummary = indexer.indexWithSummary( inputStream );
|
||||
Index index = indexer.complete();
|
||||
return toClassDescriptor( classSummary, index, entry );
|
||||
|
|
Loading…
Reference in New Issue