Repository: ignite Updated Branches: refs/heads/ignite-3906 86579fed9 -> 04ac0fc4e
Minors. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/04ac0fc4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/04ac0fc4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/04ac0fc4 Branch: refs/heads/ignite-3906 Commit: 04ac0fc4e791bec00c69442f8d7d01f1a2f357d7 Parents: 86579fe Author: vozerov-gridgain <voze...@gridgain.com> Authored: Thu Sep 15 13:17:02 2016 +0300 Committer: vozerov-gridgain <voze...@gridgain.com> Committed: Thu Sep 15 13:17:02 2016 +0300 ---------------------------------------------------------------------- .../processors/hadoop/HadoopClasspathUtils.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/04ac0fc4/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java ---------------------------------------------------------------------- diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java index 10f901b..d268bd0 100644 --- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java +++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java @@ -217,6 +217,13 @@ public class HadoopClasspathUtils { return parseUserLibs(systemOrEnv(HADOOP_USER_LIBS, null)); } + /** + * Parse user libs. + * + * @param str String. + * @return Result. + * @throws IOException If failed. + */ static Collection<SearchDirectory> parseUserLibs(String str) throws IOException { Collection<SearchDirectory> res = new LinkedList<>(); @@ -228,20 +235,16 @@ public class HadoopClasspathUtils { if (isEmpty(token)) continue; - if (token.endsWith("*")) { - // Wildcard. - File dir = new File(token).getParentFile(); + File file = new File(token); + File dir = file.getParentFile(); + if (token.endsWith("*")) { assert dir != null; res.add(new SearchDirectory(dir, AcceptAllDirectoryFilter.INSTANCE, false)); } else { - // Exact file. - File file = new File(token); - File dir = file.getParentFile(); - - // Met "/" or "C:\" pattern - nothing to do with it. + // Met "/" or "C:\" pattern, nothing to do with it. if (dir == null) continue;