Skip to content

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

Closed

Description

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").

Activity

  1. added a commit that references this issue on Nov 25, 2023
    8db3f21
  2. added 2 commits that reference this issue on Dec 13, 2023
    9b60b13
    8ec67a0
  3. added a commit that references this issue on Jan 30, 2024
    431de23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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