You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/04/11 15:33:14 UTC

[groovy] 03/20: Trivial refactoring: Remove redundant condition(`byte >= -128` is always true)

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 36894d0bb530e2f121a31268419cfd256b51237f
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Apr 11 20:29:33 2020 +0800

    Trivial refactoring: Remove redundant condition(`byte >= -128` is always true)
    
    (cherry picked from commit e33db248e1b9a059b2fa1e85a25bedf332dbec6f)
---
 src/main/java/groovy/util/CharsetToolkit.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/groovy/util/CharsetToolkit.java b/src/main/java/groovy/util/CharsetToolkit.java
index 89d977e..6e2d135 100644
--- a/src/main/java/groovy/util/CharsetToolkit.java
+++ b/src/main/java/groovy/util/CharsetToolkit.java
@@ -277,7 +277,7 @@ public class CharsetToolkit {
      * @return true if it's a continuation char.
      */
     private static boolean isContinuationChar(byte b) {
-        return -128 <= b && b <= -65;
+        return b <= -65;
     }
 
     /**