Skip to content

Unexpected split of generic arguments #766

@boris-petrov

Description

@boris-petrov

Prettier-Java 2.7.3

Playground link

--print-width 100

Input:

public abstract class Foo implements MyInterface {
	@Override
	public String foo() {
		Map<String, Map<String, Object>> deepCopy =
			(Map<String, Map<String, Object>>) Helpers.deepCopyOf(map);
	}
}

Output:

public abstract class Foo implements MyInterface {

	@Override
	public String foo() {
		Map<String, Map<String, Object>> deepCopy = (Map<
			String,
			Map<String, Object>
		>) Helpers.deepCopyOf(map);
	}
}

Expected behavior:
I don't expect the generic arguments to be split like this. It's better if the method-call is on a new line instead.

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