groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [2/4] groovy git commit: Trivial refactoring: simplify the condition expression
Date Sat, 04 Aug 2018 00:49:20 GMT
Trivial refactoring: simplify the condition expression

(cherry picked from commit b0b53090b977db250baa67d8ee35fb0fd08c3d7b)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/81418e17
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/81418e17
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/81418e17

Branch: refs/heads/GROOVY_2_5_X
Commit: 81418e177846540bd39de741b88504a9a853f13e
Parents: 925d3b1
Author: Daniel Sun <sunlan@apache.org>
Authored: Sat Aug 4 06:57:35 2018 +0800
Committer: Daniel Sun <sunlan@apache.org>
Committed: Sat Aug 4 08:48:13 2018 +0800

----------------------------------------------------------------------
 src/main/groovy/groovy/lang/GroovyClassLoader.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/81418e17/src/main/groovy/groovy/lang/GroovyClassLoader.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/GroovyClassLoader.java b/src/main/groovy/groovy/lang/GroovyClassLoader.java
index 616ceb1..ad8aae0 100644
--- a/src/main/groovy/groovy/lang/GroovyClassLoader.java
+++ b/src/main/groovy/groovy/lang/GroovyClassLoader.java
@@ -801,7 +801,7 @@ public class GroovyClassLoader extends URLClassLoader {
     protected Class recompile(URL source, String className, Class oldClass) throws CompilationFailedException,
IOException {
         if (source != null) {
             // found a source, compile it if newer
-            if ((oldClass != null && isSourceNewer(source, oldClass)) || (oldClass
== null)) {
+            if (oldClass == null || isSourceNewer(source, oldClass)) {
                 String name = source.toExternalForm();
 
                 sourceCache.remove(name);


Mime
View raw message