**Prettier-Java 2.7.4** [Playground link](https://www.jhipster.tech/prettier-java/playground#N4IgDgTglgdgLgdSgEzgCxALgKzYDQhwCGARkqhpgCwECuAzgKYAqp9WcEtjBREEAewDuABT6MY7TCCIA3AShAFORKABtYAcwDCAgLZ6iWGWrVKQjAB5hG0PROJqA8jYhE4AiCIH0ocKAIwxhLI5hCMAI60UOEibpqGWABmRGpMBADGAsiMxmC0JBoZAARsKhlwxRlqRPT0xQBiAgLFUHpgaoz28PUAsgCeAJLwtikZjMXAADowxcUAAk6yttA5xfmFUCUAypxaxUnNABQAlJMzc3PhcLQQs0czU3BPnNzFAGTvB6lMH1+vE0+3zSgP+XEYjzgJwA3BdigBfGbwkDwoA) ```sh --print-width 55 ``` **Input:** ```java public abstract class Foo implements MyInterface { @Override public String foo() { return ( true && false && true && false && true ); } } ``` **Output:** ```java public abstract class Foo implements MyInterface { @Override public String foo() { return ( true && false && true && false && true ); } } ``` **Expected behavior:** ```java public abstract class Foo implements MyInterface { @Override public String foo() { return true && false && true && false && true; } } ``` Note that making `print-width` 56 leads to a different (and still wrong result): ```java public abstract class Foo implements MyInterface { @Override public String foo() { return (true && false && true && false && true); } } ``` In this case, it correctly puts the whole thing on a single line but it doesn't remove the parentheses.
Activity
M-Vimal commentedon Sep 21, 2025
Hi, I’d like to work on this issue. Could you please assign it to me?