Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Spring Java fuzzer fallback to null value when nothing else works #2448

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

IlyaMuravjov
Copy link
Collaborator

@IlyaMuravjov IlyaMuravjov commented Jul 25, 2023

Description

Allow Spring Java fuzzer use null value at any depth for types it can't instantiate otherwise.

Makes #2428 no longer relevant for Spring Java fuzzer.

How to test

Manual tests

Generate tests for methodUnderTest with Fuzzing 100%

public class VoidHolder {
    public VoidHolder(Void voidInstance) {}

    public void methodUnderTest() {}
}

One test should generate that uses null value for java.lang.Void (type that can't be directly instantiated otherwise).

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@IlyaMuravjov IlyaMuravjov added comp-fuzzing Issue is related to the fuzzing lang-java Issue is related to Java support ctg-bug-fix PR is fixing a bug labels Jul 25, 2023
@IlyaMuravjov IlyaMuravjov marked this pull request as ready for review July 25, 2023 19:53
@IlyaMuravjov IlyaMuravjov added the comp-spring Issue is related to Spring projects support label Jul 26, 2023
@IlyaMuravjov IlyaMuravjov changed the title Make Java fuzzer fallback to null value when nothing else works Make Spring Java fuzzer fallback to null value when nothing else works Jul 26, 2023
@IlyaMuravjov IlyaMuravjov merged commit 8dd947c into main Jul 26, 2023
@IlyaMuravjov IlyaMuravjov deleted the ilya_m/fuzzer_null_fallback branch July 26, 2023 11:54
@alisevych alisevych added this to the Spring Phase 4 milestone Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-fuzzing Issue is related to the fuzzing comp-spring Issue is related to Spring projects support ctg-bug-fix PR is fixing a bug lang-java Issue is related to Java support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants