@Override public Iterator<URL> getResources(final String name) { Set<URL> resultSet = new TreeSet<>(new UrlExternalFormComparator()); try { // Try the classloader for the wicket jar/bundle Enumeration<URL> resources = Application.class.getClassLoader().getResources(name); loadResources(resources, resultSet); // Try the classloader for the user's application jar/bundle resources = Application.get().getClass().getClassLoader().getResources(name); loadResources(resources, resultSet); // Try the context class loader resources = getClassLoader().getResources(name); loadResources(resources, resultSet); } catch (Exception e) { throw new WicketRuntimeException(e); } return resultSet.iterator(); }
clazz = Class.forName(className, false, getClassLoader()); if (clazz == null)
clazz = Class.forName(className, false, getClassLoader()); if (clazz == null)
@Override public Iterator<URL> getResources(final String name) { Set<URL> resultSet = new TreeSet<>(new UrlExternalFormComparator()); try { // Try the classloader for the wicket jar/bundle Enumeration<URL> resources = Application.class.getClassLoader().getResources(name); loadResources(resources, resultSet); // Try the classloader for the user's application jar/bundle resources = Application.get().getClass().getClassLoader().getResources(name); loadResources(resources, resultSet); // Try the context class loader resources = getClassLoader().getResources(name); loadResources(resources, resultSet); } catch (Exception e) { throw new WicketRuntimeException(e); } return resultSet.iterator(); }
clazz = Class.forName(className, false, getClassLoader()); if (clazz == null)
@Override public Iterator<URL> getResources(final String name) { Set<URL> resultSet = new TreeSet<>(new UrlExternalFormComparator()); try { // Try the classloader for the wicket jar/bundle Enumeration<URL> resources = Application.class.getClassLoader().getResources(name); loadResources(resources, resultSet); // Try the classloader for the user's application jar/bundle resources = Application.get().getClass().getClassLoader().getResources(name); loadResources(resources, resultSet); // Try the context class loader resources = getClassLoader().getResources(name); loadResources(resources, resultSet); } catch (Exception e) { throw new WicketRuntimeException(e); } return resultSet.iterator(); }