Author: sebb
Date: Tue Dec 1 18:11:50 2009
New Revision: 885851
URL: http://svn.apache.org/viewvc?rev=885851&view=rev
Log:
Oops! Jorphan cannot invoke methods in JMeterUtils, so move the method there
Modified:
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java?rev=885851&r1=885850&r2=885851&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java Tue Dec 1 18:11:50 2009
@@ -55,7 +55,6 @@
import org.apache.jmeter.util.JMeterUtils;
import org.apache.jmeter.visualizers.gui.AbstractVisualizer;
import org.apache.jorphan.logging.LoggingManager;
-import org.apache.jorphan.reflect.ClassFinder;
import org.apache.log.Logger;
/**
@@ -278,7 +277,7 @@
// if no results render in jmeter.properties, load Standard (default)
List<String> classesToAdd = Collections.<String>emptyList();
try {
- classesToAdd = ClassFinder.findClassesThatExtend(ResultRenderer.class);
+ classesToAdd = JMeterUtils.findClassesThatExtend(ResultRenderer.class);
} catch (IOException e1) {
// ignored
}
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java?rev=885851&r1=885850&r2=885851&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java Tue Dec 1 18:11:50 2009
@@ -33,6 +33,7 @@
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
+import java.util.List;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.Properties;
@@ -50,6 +51,7 @@
import org.apache.commons.io.IOUtils;
import org.apache.jmeter.gui.GuiPackage;
import org.apache.jorphan.logging.LoggingManager;
+import org.apache.jorphan.reflect.ClassFinder;
import org.apache.jorphan.test.UnitTestManager;
import org.apache.jorphan.util.JOrphanUtils;
import org.apache.log.Logger;
@@ -265,6 +267,20 @@
getProperties(file);
}
+ /**
+ * Convenience method for
+ * {@link ClassFinder#findClassesThatExtend(String[], Class[], boolean)}
+ * with the option to include inner classes in the search set to false
+ * and the path list is derived from JMeterUtils.getSearchPaths().
+ *
+ * @param superClass - single class to search for
+ * @return List of Strings containing discovered class names.
+ */
+ public static List<String> findClassesThatExtend(Class<?> superClass)
+ throws IOException {
+ return ClassFinder.findClassesThatExtend(getSearchPaths(), new Class[]{superClass}, false);
+ }
+
public static String[] getSearchPaths() {
String p = JMeterUtils.getPropDefault("search_paths", null); // $NON-NLS-1$
String[] result = new String[1];
Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java?rev=885851&r1=885850&r2=885851&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java Tue Dec 1 18:11:50 2009
@@ -35,7 +35,6 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
-import org.apache.jmeter.util.JMeterUtils;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.jorphan.util.JOrphanUtils;
import org.apache.log.Logger;
@@ -149,20 +148,6 @@
/**
* Convenience method for
* {@link #findClassesThatExtend(String[], Class[], boolean)}
- * with the option to include inner classes in the search set to false
- * and the path list is derived from JMeterUtils.getSearchPaths().
- *
- * @param superClass - single class to search for
- * @return List of Strings containing discovered class names.
- */
- public static List<String> findClassesThatExtend(Class<?> superClass)
- throws IOException {
- return findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[]{superClass}, false);
- }
-
- /**
- * Convenience method for
- * {@link #findClassesThatExtend(String[], Class[], boolean)}
* with the option to include inner classes in the search set to false.
*
* @return List of Strings containing discovered class names.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.