当前使用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)); <--
}
目前,每次我自动格式化代码时,它&&
都会将||
. 但很明显,&&
属于第二条的小节。