Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 460464
Collapse All | Expand All

(-)a/bundles/org.eclipse.test.performance/src/org/eclipse/test/performance/Performance.java (-8 / +13 lines)
Lines 212-227 Link Here
212
        PerformanceMeterFactory instance = null;
212
        PerformanceMeterFactory instance = null;
213
        if (className != null && className.length() > 0) {
213
        if (className != null && className.length() > 0) {
214
            try {
214
            try {
215
                int separator = className.indexOf(':');
215
                Class c = null;
216
                Bundle bundle = null;
216
                if (Platform.isRunning()) {
217
                if (separator == -1) {
217
                    int separator = className.indexOf(':');
218
                    bundle = PerformanceTestPlugin.getDefault().getBundle();
218
                    Bundle bundle = null;
219
                    if (separator == -1) {
220
                        bundle = PerformanceTestPlugin.getDefault().getBundle();
221
                    } else {
222
                        String bundleName = className.substring(0, separator);
223
                        className = className.substring(separator + 1);
224
                        bundle = Platform.getBundle(bundleName);
225
                    }
226
                    c = bundle.loadClass(className);
219
                } else {
227
                } else {
220
                    String bundleName = className.substring(0, separator);
228
                    c = Class.forName(className);
221
                    className = className.substring(separator + 1);
222
                    bundle = Platform.getBundle(bundleName);
223
                }
229
                }
224
                Class c = bundle.loadClass(className);
225
                instance = (PerformanceMeterFactory) c.newInstance();
230
                instance = (PerformanceMeterFactory) c.newInstance();
226
            }
231
            }
227
            catch (ClassNotFoundException e) {
232
            catch (ClassNotFoundException e) {

Return to bug 460464