@Test public void testGetResourceReferencesNoWildcards() throws Exception { logger.info("testGetResourceReferencesNoWildcards()"); assertEquals("null spec", Collections.<String>emptyList(), ResourceLoader.decomposeResourceReferences(null)); assertEquals("empty string", Collections.<String>emptyList(), ResourceLoader.decomposeResourceReferences("")); assertEquals("single entry", Arrays.asList("classpath:foo.xml"), ResourceLoader.decomposeResourceReferences("classpath:foo.xml")); assertEquals("single entry, with whitespace", Arrays.asList("classpath:foo.xml"), ResourceLoader.decomposeResourceReferences(" classpath:foo.xml ")); assertEquals("multiple entries, comma-separated", Arrays.asList("classpath:foo.xml", "/bar.xml"), ResourceLoader.decomposeResourceReferences(" classpath:foo.xml,\n/bar.xml ")); assertEquals("multiple entries, whitespace-separated", Arrays.asList("classpath:foo.xml", "/bar.xml"), ResourceLoader.decomposeResourceReferences(" classpath:foo.xml\n/bar.xml ")); assertEquals("multiple entries, empty entries ignored", Arrays.asList("classpath:foo.xml", "/bar.xml"), ResourceLoader.decomposeResourceReferences(" classpath:foo.xml, ,/bar.xml ")); }
public static List<String> decomposeResourceReferences(String resourceConfig) { if (StringUtil.isBlank(resourceConfig)) return Collections.<String>emptyList(); List<String> result = new ArrayList<String>(); for (String split : resourceConfig.split("(,|\\s)+")) { split = StringUtil.trim(split); if (!StringUtil.isBlank(split)) result.add(split); } return result; }
ResourceLoader { public static List<String> decomposeResourceReferences(String resourceConfig) { if (StringUtil.isBlank(resourceConfig)) return Collections.<String>emptyList(); List<String> result = new ArrayList<String>(); for (String split : resourceConfig.split("(,|\\s)+")) { split = StringUtil.trim(split); if (!StringUtil.isBlank(split)) result.add(split); } return result; } }
ResourceLoader { public static List<String> decomposeResourceReferences(String resourceConfig) { if (StringUtil.isBlank(resourceConfig)) return Collections.<String>emptyList(); List<String> result = new ArrayList<String>(); for (String split : resourceConfig.split("(,|\\s)+")) { split = StringUtil.trim(split); if (!StringUtil.isBlank(split)) result.add(split); } return result; } ResourceLoader(WarMachine war);  ResourceLoader(WarMachine war, String baseDir); }
ResourceLoader { public static List<String> decomposeResourceReferences(String resourceConfig) { if (StringUtil.isBlank(resourceConfig)) return Collections.<String>emptyList(); List<String> result = new ArrayList<String>(); for (String split : resourceConfig.split("(,|\\s)+")) { split = StringUtil.trim(split); if (!StringUtil.isBlank(split)) result.add(split); } return result; } ResourceLoader(WarMachine war);  ResourceLoader(WarMachine war, String baseDir); InputStream getResourceAsStream(String name); static List<String> decomposeResourceReferences(String resourceConfig); InputStream openClasspathResource(String name); InputStream openFileResource(String name); InputStream openWarResource(String name); }
ResourceLoader { public static List<String> decomposeResourceReferences(String resourceConfig) { if (StringUtil.isBlank(resourceConfig)) return Collections.<String>emptyList(); List<String> result = new ArrayList<String>(); for (String split : resourceConfig.split("(,|\\s)+")) { split = StringUtil.trim(split); if (!StringUtil.isBlank(split)) result.add(split); } return result; } ResourceLoader(WarMachine war);  ResourceLoader(WarMachine war, String baseDir); InputStream getResourceAsStream(String name); static List<String> decomposeResourceReferences(String resourceConfig); InputStream openClasspathResource(String name); InputStream openFileResource(String name); InputStream openWarResource(String name);  }