Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hein2015-09-22 02:23:59 -0400
committerMarcel Hein2015-09-22 03:05:41 -0400
commit68660bf960efea67a31e365bd3edbc2730d300af (patch)
tree876be09e6923a12c812bf647dd4d164c2144976a
parent5bfcd02512984efc61c9f2aeb6e7db1d496d4076 (diff)
downloadorg.eclipse.jubula.core-68660bf960efea67a31e365bd3edbc2730d300af.tar.gz
org.eclipse.jubula.core-68660bf960efea67a31e365bd3edbc2730d300af.tar.xz
org.eclipse.jubula.core-68660bf960efea67a31e365bd3edbc2730d300af.zip
Sprint task - Fix for http://eclip.se/476864
-rw-r--r--org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java20
-rw-r--r--org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/adaptable/AdapterFactoryRegistry.java3
-rw-r--r--org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/rc/common/adapter/JavaFXJ8U40ContainerAdapterFactory.java (renamed from org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/ext/rc/common/adapter/JavaFXJ8U40ContainerAdapterFactory.java)2
-rw-r--r--org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/rc/common/adapter/package-info.java (renamed from org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/ext/rc/common/adapter/package-info.java)2
4 files changed, 17 insertions, 10 deletions
diff --git a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java
index 681f771b8..79a757f81 100644
--- a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java
+++ b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java
@@ -21,7 +21,7 @@ import java.net.URL;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Enumeration;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -546,20 +546,26 @@ public abstract class AUTServer {
}
String path = AdapterFactoryRegistry.EXT_ADAPTER_PACKAGE_NAME.replace(
'.', '/');
- Enumeration<URL> extensionsFactories = null;
+ List<URL> extensionsFactories = null;
try {
- extensionsFactories =
- this.getClass().getClassLoader().getResources(path);
+ extensionsFactories = Collections.list(this.getClass()
+ .getClassLoader().getResources(path));
+ path = AdapterFactoryRegistry.ADAPTER_PACKAGE_NAME
+ .replace('.', '/');
+ extensionsFactories.addAll(Collections.list(this.getClass()
+ .getClassLoader().getResources(path)));
+
} catch (IOException e) {
log.error("Loading classloader resources failed: " + e); //$NON-NLS-1$
}
- while (extensionsFactories != null
- && extensionsFactories.hasMoreElements()) {
- URL url = extensionsFactories.nextElement();
+ for (URL url : extensionsFactories) {
try {
List<Class> classes = ClassPathHacker.findClassesInJar(url,
AdapterFactoryRegistry.EXT_ADAPTER_PACKAGE_NAME,
this.getClass().getClassLoader());
+ classes.addAll(ClassPathHacker.findClassesInJar(url,
+ AdapterFactoryRegistry.ADAPTER_PACKAGE_NAME,
+ this.getClass().getClassLoader()));
for (Class<?> c : classes) {
if (IAdapterFactory.class.isAssignableFrom(c)) {
IAdapterFactory fac = (IAdapterFactory) c.newInstance();
diff --git a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/adaptable/AdapterFactoryRegistry.java b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/adaptable/AdapterFactoryRegistry.java
index f2b0dc818..612eddbd1 100644
--- a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/adaptable/AdapterFactoryRegistry.java
+++ b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/adaptable/AdapterFactoryRegistry.java
@@ -17,6 +17,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -81,7 +82,7 @@ public class AdapterFactoryRegistry {
Collection<IAdapterFactory> registeredFactories = m_registrationMap
.get(supportedClasses[i]);
if (registeredFactories == null) {
- registeredFactories = new ArrayList<IAdapterFactory>();
+ registeredFactories = new HashSet<IAdapterFactory>();
}
registeredFactories.add(factory);
m_registrationMap.put(supportedClasses[i], registeredFactories);
diff --git a/org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/ext/rc/common/adapter/JavaFXJ8U40ContainerAdapterFactory.java b/org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/rc/common/adapter/JavaFXJ8U40ContainerAdapterFactory.java
index cfd8a572a..c59b4b780 100644
--- a/org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/ext/rc/common/adapter/JavaFXJ8U40ContainerAdapterFactory.java
+++ b/org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/rc/common/adapter/JavaFXJ8U40ContainerAdapterFactory.java
@@ -8,7 +8,7 @@
* Contributors:
* BREDEX GmbH - initial API and implementation
*******************************************************************************/
-package org.eclipse.jubula.ext.rc.common.adapter;
+package org.eclipse.jubula.rc.common.adapter;
import javafx.scene.control.ButtonBar;
diff --git a/org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/ext/rc/common/adapter/package-info.java b/org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/rc/common/adapter/package-info.java
index da2b73987..17ce39d92 100644
--- a/org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/ext/rc/common/adapter/package-info.java
+++ b/org.eclipse.jubula.rc.javafx.j8u40/src/org/eclipse/jubula/rc/common/adapter/package-info.java
@@ -8,4 +8,4 @@
* Contributors:
* BREDEX GmbH - initial API and implementation and/or initial documentation
*******************************************************************************/
-package org.eclipse.jubula.ext.rc.common.adapter; \ No newline at end of file
+package org.eclipse.jubula.rc.common.adapter; \ No newline at end of file

Back to the top