# IGNITE-141 - Fixing tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/71be6c6c Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/71be6c6c Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/71be6c6c Branch: refs/heads/sprint-2 Commit: 71be6c6c869f5a745c783e4a6b57920b7d99e49b Parents: 257029d Author: Valentin Kulichenko <vkuliche...@gridgain.com> Authored: Thu Mar 5 17:25:57 2015 -0800 Committer: Valentin Kulichenko <vkuliche...@gridgain.com> Committed: Thu Mar 5 17:25:57 2015 -0800 ---------------------------------------------------------------------- .../marshaller/MarshallerContextTestImpl.java | 29 ++++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/71be6c6c/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java index 4d7b201..52d49bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextTestImpl.java @@ -27,7 +27,10 @@ import java.util.concurrent.*; */ public class MarshallerContextTestImpl implements MarshallerContext { /** */ - private static final String CLS_NAMES_FILE = "org/apache/ignite/internal/classnames.properties"; + private static final String[] CLS_NAMES_FILES = { + "org/apache/ignite/internal/classnames.properties", + "org/apache/ignite/internal/classnames-jdk.properties" + }; /** */ private final ConcurrentMap<Integer, Class> map = new ConcurrentHashMap8<>(); @@ -38,21 +41,23 @@ public class MarshallerContextTestImpl implements MarshallerContext { try { ClassLoader ldr = getClass().getClassLoader(); - BufferedReader rdr = new BufferedReader(new InputStreamReader(ldr.getResourceAsStream(CLS_NAMES_FILE))); + for (String file : CLS_NAMES_FILES) { + BufferedReader rdr = new BufferedReader(new InputStreamReader(ldr.getResourceAsStream(file))); - String line; + String line; - while ((line = rdr.readLine()) != null) { - if (line.isEmpty() || line.startsWith("#")) - continue; + while ((line = rdr.readLine()) != null) { + if (line.isEmpty() || line.startsWith("#")) + continue; - try { - Class cls = Class.forName(line.trim(), false, ldr); + try { + Class cls = Class.forName(line.trim(), false, ldr); - map.put(cls.getName().hashCode(), cls); - } - catch (ClassNotFoundException | NoClassDefFoundError ignored) { - // No-op. + map.put(cls.getName().hashCode(), cls); + } + catch (ClassNotFoundException | NoClassDefFoundError ignored) { + // No-op. + } } } }