Created
October 17, 2025 15:47
-
-
Save thomasfenaroli-wf/9c7d506f2b0eb2f2f156411c6d911a1e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public Unit process() { | |
| Set<Method> annotatedMethods = reflections.getMethodsAnnotatedWith(annotationClass); | |
| Set<Field> annotatedFields = reflections.getFieldsAnnotatedWith(annotationClass); | |
| List<DataSet> dataSets = Sets.union(annotatedFields, annotatedMethods).stream() | |
| .map(this::buildDataSet) | |
| .sorted(Comparator.comparing(DataSet::getStaleAt)) | |
| .toList(); | |
| Multimap<Author, StaleDatasetRow> authorToStaleDatasetRows = ArrayListMultimap.create(); | |
| for (DataSet dataSet : dataSets) { | |
| for (StaleDatasetRow staleDatasetRow : dataSet.toReportRowIfStale()) { | |
| authorToStaleDatasetRows.put(dataSet.getAuthor(), staleDatasetRow); | |
| } | |
| dataSet.pageIfExpired(); | |
| } | |
| maybeSendStalenessReport(authorToStaleDatasetRows); | |
| return Unit.unit; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment