Skip to content

error: expected token: '_'; generated instead #1236

Open
@koppor

Description

@koppor

I am trying 2.58.0 on my project.

I get

Step 'palantir-java-format' found problem in 'src\main\java\org\jabref\gui\commonfxcontrols\CitationKeyPatternsPanel.java':
69:39: error: expected token: '_'; generated  instead
com.palantir.javaformat.java.FormatterException: 69:39: error: expected token: '_'; generated  instead
        at com.palantir.javaformat.java.Formatter.getFormatReplacements(Formatter.java:322)
        at com.palantir.javaformat.java.Formatter.formatSource(Formatter.java:297)
        at com.palantir.javaformat.java.Formatter.formatSource(Formatter.java:252)
        at com.palantir.javaformat.java.Formatter.formatSourceAndFixImports(Formatter.java:269)
        at com.palantir.javaformat.java.FormatterServiceImpl.formatSourceReflowStringsAndFixImports(FormatterServiceImpl.java:43)

The code is

        this.setOnSort(event ->
                viewModel.patternListProperty().sort(CitationKeyPatternsPanelViewModel.defaultOnTopComparator));

        patternColumn.setSortable(true);

Variable event is unused, but the error appears at true. When replacing event by _, the error persists.

Full case: JabRef/jabref-koppor#672. Execute ./gradlew spotlessApply on the command line.

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