Skip to content

Mutator REMOVE_CONDITIONALS applies always when using the DEFAULTS group only #1400

@Red-CF

Description

@Red-CF

I'm experiencing an unwanted/uncalled mutator with the following configuration:

Image

Using only the DEFAULTS group, adds the REMOVE_CONDITIONALS which by the docs isn't inside this group.

Searching through the code, I saw that in the class StandardMutatorGroups, it was added in the flavor of "REMOVE_CONDITIONALS_ORDER_ELSE" & "REMOVE_CONDITIONALS_EQUAL_ELSE":

`public class StandardMutatorGroups implements MutatorGroup {
@OverRide
public void register(Map<String, List> mutators) {

    mutators.put("DEFAULTS", gather(mutators,"INVERT_NEGS",
            "MATH",
            "VOID_METHOD_CALLS",
            "REMOVE_CONDITIONALS_ORDER_ELSE",
            "REMOVE_CONDITIONALS_EQUAL_ELSE",
            "CONDITIONALS_BOUNDARY",
            "INCREMENTS", "RETURNS"));

    mutators.put("STRONGER", gather(mutators,"DEFAULTS",
            "EXPERIMENTAL_SWITCH",
            "REMOVE_CONDITIONALS_ORDER_IF",
            "REMOVE_CONDITIONALS_EQUAL_IF"));

}

}`

My goal in opening the issue here, is to address why it's added and why there's no mention in the docs about it.

Thanks in advance :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions