From 34d803ee15bad7520870f5fdcbc685f9d20d3a86 Mon Sep 17 00:00:00 2001 From: Axel Howind Date: Tue, 28 Nov 2023 06:38:55 +0100 Subject: [PATCH] code cleanup --- .../main/java/com/dua3/utility/text/RichText.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utility/src/main/java/com/dua3/utility/text/RichText.java b/utility/src/main/java/com/dua3/utility/text/RichText.java index 0814bd63..870fbb95 100644 --- a/utility/src/main/java/com/dua3/utility/text/RichText.java +++ b/utility/src/main/java/com/dua3/utility/text/RichText.java @@ -201,7 +201,7 @@ public static boolean textAndFontEquals(@Nullable RichText a, @Nullable RichText return true; } - if (a == null || b == null || !a.equalsText(b)) { + if (a == null || !a.equalsText(b)) { return false; } @@ -615,11 +615,11 @@ public RichText subSequence(int start, int end) { /** * Get a sub range of this instance. * - * @param begin begin index (inclusive) + * @param start start index (inclusive) * @return RichText instance of the sub range from beginIndex to the end */ - public RichText subSequence(int begin) { - return subSequence(begin, length()); + public RichText subSequence(int start) { + return subSequence(start, length()); } @Override @@ -653,7 +653,7 @@ public RichText trim() { } private boolean isSimpleWhitespace(char ch) { - return ch <= '\u0020'; + return ch <= ' '; } /** @@ -700,7 +700,7 @@ public RichText stripTrailing() { return subSequence(0, len); } - private boolean isWhitespace(char ch) { + private static boolean isWhitespace(char ch) { return Character.isWhitespace(ch); }