Skip to content

Comments

fix: Make ClassGraph discover package-private @Route views#2142

Closed
Artur- wants to merge 2 commits intomainfrom
fix-route-scan
Closed

fix: Make ClassGraph discover package-private @Route views#2142
Artur- wants to merge 2 commits intomainfrom
fix-route-scan

Conversation

@Artur-
Copy link
Member

@Artur- Artur- commented Feb 24, 2026

ClassGraph's default scan only returns public classes. Add ignoreClassVisibility() to the route auto-discovery scan so package-private views annotated with @route are found

ClassGraph's default scan only returns public classes. Add ignoreClassVisibility() to the route auto-discovery scan so package-private views annotated with @route are found.
@Artur- Artur- marked this pull request as ready for review February 25, 2026 06:46
@Artur- Artur- requested a review from mcollovati February 25, 2026 06:47
Copy link
Contributor

@mcollovati mcollovati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a simple test, like DiscoverRoutesInAnnotatedClassPackageTest in browserless-test/junit6/src/test/java/com/vaadin/browserless/viewscan/nonpubliclass pacakge to prevent future regressions?

Adds a package-private view (PackagePrivateView) and a dedicated test
to verify that autoDiscoverViews() finds non-public @route views.
@Artur-
Copy link
Member Author

Artur- commented Feb 25, 2026

added

@Artur-
Copy link
Member Author

Artur- commented Feb 25, 2026

@Artur- Artur- closed this Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants