0

現在IntelliJ 2018.2.3を使用しています。

次の動作を実現するために、コード スタイル (またはその他の場所) のどのオプションをチェック/チェック解除する必要がありますか?

意図した動作:

@Override
public boolean equals(Object other) {
    return other == this // short circuit if same object
            || (other instanceof UniquePersonList // instanceof handles nulls
               && this.internalList.equals(((UniquePersonList) other).internalList)); <--
}

現在の動作

@Override
public boolean equals(Object other) {
    return other == this // short circuit if same object
            || (other instanceof UniquePersonList // instanceof handles nulls
            && this.internalList.equals(((UniquePersonList) other).internalList)); <--
}

現在、コードを自動フォーマットするたびに、&&が に揃えられるようにシフトされ||ます。&&しかし、第 2 節のサブセクションに属することは明らかです。

4

1 に答える 1