Skip to content

Formatter fails with Javadoc on import #424

Description

@carl-mastrangelo

The annotation is wrong for the Java file, but this is a compiling, small reproducing case. The following file complains about syntax errors:

package foo;

import groovy.transform.CompileStatic;

/**
 * Created.
 */
import java.util.ArrayList;

/**
 * Created.
 */
@CompileStatic
public class Broken {
    ArrayList<?> list;
}

Activity

  1. cushon commented on Dec 19, 2019

    @cushon
    Collaborator

    For posterity:

    google-java-format T.java
    T.java:error: Imports not contiguous (perhaps a comment separates them?)
    

    i.e.

    throw new FormatterException("Imports not contiguous (perhaps a comment separates them?)");

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