Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2011-11-04 15:51:58 -0400
committerThomas Watson2011-11-04 15:51:58 -0400
commitade0fa29ef31ff63a7d0f0acaf08c5dab63a17a3 (patch)
treea229693f1eda91bdc4af04a391359cdb1a3210a9
parent87d904bb25c232845160fa7fac98be5ad82eebef (diff)
downloadrt.equinox.framework-ade0fa29ef31ff63a7d0f0acaf08c5dab63a17a3.tar.gz
rt.equinox.framework-ade0fa29ef31ff63a7d0f0acaf08c5dab63a17a3.tar.xz
rt.equinox.framework-ade0fa29ef31ff63a7d0f0acaf08c5dab63a17a3.zip
Bug 362589 - Add DefaultClassLoader.toStringv20111107-1631
-rw-r--r--bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java
index 6550b684b..6d252fd95 100644
--- a/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java
+++ b/bundles/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -289,4 +289,12 @@ public class DefaultClassLoader extends ClassLoader implements ParallelClassLoad
public Collection<String> listLocalResources(String path, String filePattern, int options) {
return manager.listLocalResources(path, filePattern, options);
}
+
+ public String toString() {
+ Bundle b = getBundle();
+ StringBuffer result = new StringBuffer(super.toString());
+ if (b == null)
+ return result.toString();
+ return result.append('[').append(b.getSymbolicName()).append(':').append(b.getVersion()).append("(id=").append(b.getBundleId()).append(")]").toString(); //$NON-NLS-1$//$NON-NLS-2$
+ }
}

Back to the top