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

Guessing extracted method name doesn't work when not selecting variable #2690

Closed
fbricon opened this issue Jun 7, 2023 · 0 comments · Fixed by #2693
Closed

Guessing extracted method name doesn't work when not selecting variable #2690

fbricon opened this issue Jun 7, 2023 · 0 comments · Fixed by #2693

Comments

@fbricon
Copy link
Contributor

fbricon commented Jun 7, 2023

Following up on #2670, given the following code:

public static void main(String[] args) {
    int numArgs = args == null ? 0 : args.length;
    System.out.println(numArgs);
  }

when selecting args == null ? 0 : args.length;, extract method doesn't guess the name based on the variable the selected snippet is assigned to (IntelliJ IDEA does it properly):

extract method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant