google / google/google-java-format
Incorrect formatting of then clause when there is a comment on the line with `if`
Aperta
- Lingua principale
- Java
- Stelle
- 6.2k
- Fork
- 937
- Merge medio
- 6m
- PR unite (30g)
- 3
Descrizione
Consider the following code, which has been formatted with google-java-format:
```java
public class CommentedTest {
public boolean comparableOrSuperclassEitherWay(ProglangType other) {
if (this == other) // ProglangType objects are interned
return true;
if (((this.base == BASE_OBJECT) && other.baseIsObject()) // interned strings
|| ((other.base == BASE_OBJECT) && baseIsObject())) // interned strings
return true;
return false;
}
}
```
The two `return true;` lines ought to be indented, but they are not.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.