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

fix: fix parsing of unannPrimitiveType in primary #421

Conversation

clementdessoude
Copy link
Contributor

@clementdessoude clementdessoude commented Aug 22, 2020

What changed with this PR:

Fix parsing of this kind of code:

import java.util.List;

public class Test {
    public static void main(String[] args) {
        List.of().toArray(double[][]::new);
    }
}

Example

// Input
List.of(new double[][] { 1,2,3,4.1,5.6846465}, new double[][] { 1,2,3,4.1,5.6846465}, new double[][] { 1,2,3,4.1,5.6846465}).toArray(double[][]::new);

// Output
    List
      .of(
        new double[][] { 1, 2, 3, 4.1, 5.6846465 },
        new double[][] { 1, 2, 3, 4.1, 5.6846465 },
        new double[][] { 1, 2, 3, 4.1, 5.6846465 }
      )
      .toArray(double[][]::new);

Relative issues or prs:

Fix #412 & Fix #376

@clementdessoude clementdessoude force-pushed the fix/412-fix-unannTypePrimitiveWithMethodReferenceSuffix branch from cf8af0f to d37389d Compare August 22, 2020 08:54
@clementdessoude clementdessoude merged commit f9b4249 into jhipster:master Aug 22, 2020
@clementdessoude clementdessoude deleted the fix/412-fix-unannTypePrimitiveWithMethodReferenceSuffix branch June 18, 2021 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parse error on double[][]::new java-parser: primitiveType dims cannot have methodReferenceSuffix
1 participant