Author: davsclaus Date: Sat Apr 6 07:46:01 2013 New Revision: 1465207 URL: http://svn.apache.org/r1465207 Log: CAMEL-6247: Dont log illegal state exception on stopping blueprint as it may happen at WARN level.
Modified: camel/branches/camel-2.10.x/ (props changed) camel/branches/camel-2.10.x/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java Propchange: camel/branches/camel-2.10.x/ ------------------------------------------------------------------------------ Merged /camel/trunk:r1465206 Propchange: camel/branches/camel-2.10.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.10.x/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java?rev=1465207&r1=1465206&r2=1465207&view=diff ============================================================================== --- camel/branches/camel-2.10.x/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java (original) +++ camel/branches/camel-2.10.x/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java Sat Apr 6 07:46:01 2013 @@ -147,7 +147,13 @@ public final class CamelBlueprintHelper } } } catch (Exception e) { - LOG.warn("Error during disposing BundleContext. This exception will be ignored.", e); + IllegalStateException ise = ObjectHelper.getException(IllegalStateException.class, e); + if (ise != null) { + // we dont care about illegal state exception as that may happen from OSGi + LOG.debug("Error during disposing BundleContext. This exception will be ignored.", e); + } else { + LOG.warn("Error during disposing BundleContext. This exception will be ignored.", e); + } } finally { String tempDir = System.clearProperty("org.osgi.framework.storage"); if (tempDir != null) {