Prettier-Java 2.7.5
Playground link
Input:
public abstract class Foo implements MyInterface {
@Override public String foo() {
return true
? // foo
1
: // bar
2;
}
}
Output:
public abstract class Foo implements MyInterface {
@Override
public String foo() {
return true // foo
? 1 // bar
: 2;
}
}
Expected behavior:
Either the ternary to not be modified or something like:
public abstract class Foo implements MyInterface {
@Override
public String foo() {
return true
? 1 // foo
: 2; // bar
}
}
Prettier-Java 2.7.5
Playground link
Input:
Output:
Expected behavior:
Either the ternary to not be modified or something like: