Skip to content

StepInto method target doesn't work if the method is part of wrapped expression #519

@gayanper

Description

@gayanper

Take the example

mport java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class DemoApplication {

  public static void main(String[] args) {
    new DemoApplication().test();
  }

  private void test() {
    new ArrayList<>(List.of("1"))
      .subList(0, 1)
      .addAll(mergedData());

    new ArrayList<>(List.of("1"))
      .subList(0, 1)
      .addAll(filterMe("1", 
        "2", "3", 
        "4"));

  }

  private Collection<? extends String> mergedData() {
    return List.of("Merged");
  }

  private Collection<? extends String> filterMe(String string1, String string2, String string3, String string4) {
    return mergedData();
  }
}

Now try to add breakpoints at expression new ArrayList<>(List.of("1")).subList(0, 1).addAll(mergedData()); and select mergedData as target which will not work.

Also the same if you try on the next expression and try to jump into filterMe("1", "2", "3", "4").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions