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

Replace nullFuzzedValue with primitive-aware defaultFuzzedValue #2449

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

IlyaMuravjov
Copy link
Collaborator

@IlyaMuravjov IlyaMuravjov commented Jul 25, 2023

Description

Use introduced defaultFuzzedValue() instead of nullFuzzedValue() in FieldValueProvider to avoid using null as default for primitive types.

How to test

Manual tests

In OrderService class in spring-boot-tetsing project replace public Order getOrderById(Long id) with public Order getOrderById(long id) and generate integration tests.

There should be no IllegalArgumentException exceptions about null being passed to primitive accepting method in engine process logs.

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 merged commit 9f47eed into main Jul 26, 2023
37 checks passed
@IlyaMuravjov IlyaMuravjov deleted the ilya_m/default_fuzzed_value branch July 26, 2023 13:29
@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 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