From: Henri Sara Date: Tue, 27 Oct 2009 15:08:16 +0000 (+0000) Subject: Corrections to support for multiple source paths in widgetset builder X-Git-Tag: 6.7.0.beta1~2371 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=44f5e4a252a8053dece47f94556af82643ec3874;p=vaadin-framework.git Corrections to support for multiple source paths in widgetset builder svn changeset:9412/svn branch:6.2 --- diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java b/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java index ff8786a6b5..6a45860803 100644 --- a/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java +++ b/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java @@ -98,7 +98,21 @@ public class ClassPathExplorer { files[i].length() - 8); classname = classpathLocations.get(location) + "." + classname; - widgetsets.put(classname, location); + if (!widgetsets.containsKey(classname)) { + String packageName = classpathLocations.get(location); + String packagePath = packageName.replaceAll("\\.", "/"); + String basePath = location.getFile().replaceAll( + "/" + packagePath + "$", ""); + try { + URL url = new URL(location.getProtocol(), location + .getHost(), location.getPort(), basePath); + widgetsets.put(classname, url); + } catch (MalformedURLException e) { + // should never happen as based on an existing URL, + // only changing end of file name/path part + e.printStackTrace(); + } + } } } } else {