#3610, 3611: inverted isEmpty method on ComponentStyle

This commit is contained in:
Diogo Correia
2024-02-02 01:16:46 +01:00
committed by GitHub
parent 02c5c1ee76
commit c3f228f626
2 changed files with 27 additions and 5 deletions

View File

@@ -186,15 +186,15 @@ public final class ComponentStyle implements Cloneable
}
/**
* Returns whether this style has any formatting explicitly set.
* Returns whether this style has no formatting explicitly set.
*
* @return true if at least one value is set, false if none are set
* @return true if no value is set, false if at least one is set
*/
public boolean isEmpty()
{
return color != null || font != null || bold != null
|| italic != null || underlined != null
|| strikethrough != null || obfuscated != null;
return color == null && font == null && bold == null
&& italic == null && underlined == null
&& strikethrough == null && obfuscated == null;
}
@Override