ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [2/2] ignite git commit: WIP.
Date Thu, 15 Sep 2016 16:32:39 GMT
WIP.


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

Branch: refs/heads/ignite-3909
Commit: a6ed71b2b594b763a57eb7b49bc08b42f374407c
Parents: a68826d
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Sep 15 19:32:25 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Sep 15 19:32:25 2016 +0300

----------------------------------------------------------------------
 .../processors/hadoop/HadoopClassLoader.java     | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a6ed71b2/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClassLoader.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClassLoader.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClassLoader.java
index f457ffa..4cc3aa4 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClassLoader.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClassLoader.java
@@ -441,44 +441,39 @@ public class HadoopClassLoader extends URLClassLoader implements ClassCache
{
         // Large "org" group.
         if (cls.startsWith(PKG_ORG)) {
             // Large "apache" group.
-            if (cls.startsWith(PKG_ORG_APACHE)) {
+            if (startsWith(cls, PKG_ORG, "apache.")) {
                 // Hadoop classes always have dependencies.
                 if (startsWith(cls, PKG_ORG_APACHE, "hadoop."))
                     return true;
-
                 // Filter out Ignite classes which definitely do not have dependencies.
-                if (startsWith(cls, PKG_ORG_APACHE, "ignite.")) {
+                else if (startsWith(cls, PKG_ORG_APACHE, "ignite.")) {
                     if (!cls.contains(".hadoop.") && !cls.contains(".igfs.") &&
!cls.contains(".fs."))
                         return false;
                 }
-
                 // Other well-known "org.apache" packages.
-                if (startsWith(cls, PKG_ORG_APACHE, "commons.") ||
+                else if (startsWith(cls, PKG_ORG_APACHE, "commons.") ||
                     startsWith(cls, PKG_ORG_APACHE, "log4j.") ||
                     startsWith(cls, PKG_ORG_APACHE, "xerces."))
                     return false;
             }
-
             // Other well-known "org" packages.
-            if (startsWith(cls, PKG_ORG, "jsr166.") ||
+            else if (startsWith(cls, PKG_ORG, "jsr166.") ||
                 startsWith(cls, PKG_ORG, "w3c.") ||
                 startsWith(cls, PKG_ORG, "slf4j.") ||
                 startsWith(cls, PKG_ORG, "xml.sax."))
                 return false;
         }
-
         // Filter out Java system packages.
-        if (cls.startsWith("java.") ||
+        else if (cls.startsWith("java.") ||
             cls.startsWith("javax.") ||
             cls.startsWith("sun.") ||
             cls.startsWith("com.sun."))
             return false;
-
         // Other well-known packages.
-        if (cls.startsWith("com.google.common"))
+        else if (cls.startsWith("com.google.common"))
             return false;
 
-        // No more guesses, will parse the class.
+        // Will parse class.
         return null;
     }
 


Mime
View raw message