Skip to content

Comments

feat: ValuePool can now reference suppliers in any class#1046

Open
oetr wants to merge 2 commits intomainfrom
CIF-1906-allow-source-methods-in-other-classes
Open

feat: ValuePool can now reference suppliers in any class#1046
oetr wants to merge 2 commits intomainfrom
CIF-1906-allow-source-methods-in-other-classes

Conversation

@oetr
Copy link
Contributor

@oetr oetr commented Feb 18, 2026

When specifying supplier methods for @ValuePool annotation, it is now possible to use fully qualified names to access methods of any class, not just the fuzz test class. E.g.:

@ValuePool(value = {"mySupplier", "anotherSupplier", 
                    "com.example.MyClass#mySupplierMethod",
                    "com.example.OuterClass$InnerClass#mySupplierMethod"})

@oetr oetr force-pushed the CIF-1906-allow-source-methods-in-other-classes branch 4 times, most recently from 3a489f3 to e9fcaad Compare February 19, 2026 17:11
@oetr oetr marked this pull request as ready for review February 19, 2026 17:11
Copilot AI review requested due to automatic review settings February 19, 2026 17:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enhances the @ValuePool annotation to support supplier methods from any class, not just the fuzz test class. Previously, users could only reference supplier methods by their simple name within the same test class. Now, they can use fully qualified references with the format com.example.ClassName#methodName or com.example.OuterClass$InnerClass#methodName for nested classes.

Changes:

  • Added support for fully qualified supplier method references in the format ClassName#methodName
  • Refactored ValuePoolRegistry to resolve and load supplier methods from any class with fallback class loader strategy
  • Added comprehensive test coverage for external supplier references, nested classes, validation, and edge cases
  • Updated documentation in both Javadoc and markdown files with examples and usage guidelines

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/main/java/com/code_intelligence/jazzer/mutation/support/ValuePoolRegistry.java Refactored supplier resolution to support fully qualified method references with dynamic class loading and validation
src/main/java/com/code_intelligence/jazzer/mutation/annotation/ValuePool.java Updated Javadoc to document the new fully qualified reference syntax
src/test/java/com/code_intelligence/jazzer/mutation/support/ValuePoolRegistry.java Added new test support class with external supplier methods for testing cross-class references
src/test/java/com/code_intelligence/jazzer/mutation/support/ValuePoolsTest.java Added 15 new test cases covering external suppliers, nested classes, validation, caching, and error scenarios
src/test/java/com/code_intelligence/jazzer/mutation/support/BUILD.bazel Added the new test support file to the build configuration
docs/mutation-framework.md Updated documentation with examples of fully qualified supplier references and improved clarity on type propagation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@oetr oetr force-pushed the CIF-1906-allow-source-methods-in-other-classes branch from e9fcaad to f9e87fc Compare February 20, 2026 08:53
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.

1 participant