servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r564900 - in /incubator/servicemix/trunk/core/servicemix-core: ./ src/main/java/org/apache/servicemix/ src/main/java/org/apache/servicemix/client/ src/main/java/org/apache/servicemix/components/util/ src/main/java/org/apache/servicemix/expr...
Date Sat, 11 Aug 2007 11:49:20 GMT
Author: gnodet
Date: Sat Aug 11 04:49:18 2007
New Revision: 564900

URL: http://svn.apache.org/viewvc?view=rev&rev=564900
Log:
Fix PMD violations

Modified:
    incubator/servicemix/trunk/core/servicemix-core/pom.xml
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/Main.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/XPathHelper.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/components/util/FileExtensionPropertyExpression.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/components/util/PojoSupport.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JaxenXPathExpression.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/EnvironmentContext.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ServiceAssemblyEnvironment.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AdminCommandsService.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentNameSpace.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationContextImpl.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationService.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallerMBeanImpl.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/SharedLibrary.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/DOMStreamReader.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/SourceTransformer.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StAXSourceTransformer.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReader.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CNamespaceContext.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jmx/PasswordAuthenticator.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/logging/LogTask.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/BaseStandardMBean.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/DefaultBroker.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/FlowProvider.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlowTibco.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/seda/SedaFlow.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/acl/impl/AuthorizationEntry.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/servicedesc/InternalEndpoint.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileUtil.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/URISupport.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/view/DotViewService.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/SpringTestSupport.java
    incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/RemoteServiceMixClientTest.java
    incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/DeploymentMessageTest.java
    incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReaderTest.java
    incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/messaging/JcaFlowPersistentTest.java
    incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/messaging/JcaFlowTransactionTest.java
    incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/nmr/flow/jms/StatelessJmsFlowTest.java
    incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/GroupPrincipalTest.java
    incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/UserPrincipalTest.java
    incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/remoting/RemoteServiceMixClientTest.java

Modified: incubator/servicemix/trunk/core/servicemix-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/pom.xml?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/pom.xml (original)
+++ incubator/servicemix/trunk/core/servicemix-core/pom.xml Sat Aug 11 04:49:18 2007
@@ -23,7 +23,7 @@
 
   <parent>
     <groupId>org.apache.servicemix</groupId>
-    <artifactId>core</artifactId>
+    <artifactId>parent</artifactId>
     <version>3.2-incubating-SNAPSHOT</version>
   </parent>
 

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/Main.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/Main.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/Main.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/Main.java Sat Aug 11 04:49:18 2007
@@ -55,7 +55,7 @@
             } else {
                 String file = args[0];
 
-                if (file.equals("-?") || file.equals("?") || file.equals("--help") || file.equals("-h")) {
+                if ("-?".equals(file) || "?".equals(file) || "--help".equals(file) || "-h".equals(file)) {
                     System.out.println("Usage: Main [-v1] [xmlConfigFile]");
                     System.out.println("If an XML config file is not specified then servicemix.xml is used from the CLASSPATH");
                     return;

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java Sat Aug 11 04:49:18 2007
@@ -179,10 +179,8 @@
      * Provide access to the default message exchange exchangeFactory, lazily creating one.
      */
     public MessageExchangeFactory getExchangeFactory() throws MessagingException {
-        if (exchangeFactory == null) {
-            if (context != null) {
-                exchangeFactory = getDeliveryChannel().createExchangeFactory();
-            }
+        if (exchangeFactory == null && context != null) {
+            exchangeFactory = getDeliveryChannel().createExchangeFactory();
         }
         return exchangeFactory;
     }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/XPathHelper.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/XPathHelper.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/XPathHelper.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/XPathHelper.java Sat Aug 11 04:49:18 2007
@@ -34,6 +34,7 @@
  * @version $Revision: $
  */
 public class XPathHelper {
+
     private Source content;
     private XPathFactory xPathFactory;
     private XPath xPath;
@@ -42,11 +43,11 @@
     }
 
     public XPathHelper(NormalizedMessage message) {
-        setMessage(message);
+        this.content = message.getContent();
     }
 
     public XPathHelper(Source content) {
-        setContent(content);
+        this.content = content;
     }
 
     public XPathHelper(NormalizedMessage message, Map namespaces) {
@@ -83,7 +84,7 @@
         this.content = content;
     }
 
-    public NamespaceContext getNamespaceContext() {
+    public final NamespaceContext getNamespaceContext() {
         return getXPath().getNamespaceContext();
     }
 
@@ -95,7 +96,7 @@
         return getXPath().getXPathVariableResolver();
     }
 
-    public void setNamespaceContext(NamespaceContext context) {
+    public final void setNamespaceContext(NamespaceContext context) {
         getXPath().setNamespaceContext(context);
     }
 
@@ -122,7 +123,7 @@
         return content;
     }
 
-    public XPath getXPath() {
+    public final XPath getXPath() {
         if (xPath == null) {
             xPath = getXPathFactory().newXPath();
         }
@@ -133,9 +134,8 @@
      * Sets the namespace context to the given map where the keys are namespace
      * prefixes and the values are the URIs
      */
-    public void setNamespaces(Map namespaces) {
+    public final void setNamespaces(Map namespaces) {
         setNamespaceContext(new DefaultNamespaceContext(getNamespaceContext(), namespaces));
-
     }
 
     // Implementation methods

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/components/util/FileExtensionPropertyExpression.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/components/util/FileExtensionPropertyExpression.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/components/util/FileExtensionPropertyExpression.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/components/util/FileExtensionPropertyExpression.java Sat Aug 11 04:49:18 2007
@@ -63,12 +63,10 @@
 
     private String removeExtension(String fileName) {
         String result = fileName;
-        if (this.deleteExistingExtension) {
-            if ((fileName != null) && (fileName.length() > 1)) {
-                int index = fileName.lastIndexOf('.');
-                if (index != -1) {
-                    result = fileName.substring(0, index);
-                }
+        if (this.deleteExistingExtension && fileName != null && fileName.length() > 1) {
+            int index = fileName.lastIndexOf('.');
+            if (index != -1) {
+                result = fileName.substring(0, index);
             }
         }
         return result;

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/components/util/PojoSupport.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/components/util/PojoSupport.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/components/util/PojoSupport.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/components/util/PojoSupport.java Sat Aug 11 04:49:18 2007
@@ -164,10 +164,8 @@
      * Provide access to the default message exchange exchangeFactory, lazily creating one.
      */
     public MessageExchangeFactory getExchangeFactory() throws MessagingException {
-        if (exchangeFactory == null) {
-            if (context != null) {
-                exchangeFactory = getDeliveryChannel().createExchangeFactory();
-            }
+        if (exchangeFactory == null && context != null) {
+            exchangeFactory = getDeliveryChannel().createExchangeFactory();
         }
         return exchangeFactory;
     }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JaxenXPathExpression.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JaxenXPathExpression.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JaxenXPathExpression.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/expression/JaxenXPathExpression.java Sat Aug 11 04:49:18 2007
@@ -73,10 +73,14 @@
      */
     public JaxenXPathExpression(String xpath) throws Exception {
         this.xpath = xpath;
-        afterPropertiesSet();
+        init();
     }
 
     public void afterPropertiesSet() throws Exception {
+        init();
+    }
+
+    private void init() throws JaxenException {
         if (xpathObject == null) {
             if (xpath == null) {
                 throw new IllegalArgumentException("You must specify the xpath property");
@@ -211,7 +215,7 @@
 
     // Implementation methods
     // -------------------------------------------------------------------------
-    protected XPath createXPath(String xp) throws JaxenException {
+    protected final XPath createXPath(String xp) throws JaxenException {
         return new DOMXPath(xp);
     }
 

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/EnvironmentContext.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/EnvironmentContext.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/EnvironmentContext.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/EnvironmentContext.java Sat Aug 11 04:49:18 2007
@@ -255,8 +255,7 @@
         if (getComponentsDir() == null) {
             return null;
         }
-        File result = FileUtil.getDirectoryPath(getComponentsDir(), componentName);
-        return result;
+        return FileUtil.getDirectoryPath(getComponentsDir(), componentName);
     }
 
     /**
@@ -270,8 +269,7 @@
         if (getComponentsDir() == null) {
             return null;
         }
-        File result = FileUtil.getDirectoryPath(getComponentsDir(), componentName);
-        return result;
+        return FileUtil.getDirectoryPath(getComponentsDir(), componentName);
     }
 
     /**
@@ -284,8 +282,7 @@
     public File getNewComponentInstallationDir(String componentName) throws IOException {
         File result = getComponentRootDir(componentName);
         // get new version dir
-        result = FileVersionUtil.getNewVersionDirectory(result);
-        return result;
+        return FileVersionUtil.getNewVersionDirectory(result);
     }
 
     /**
@@ -298,8 +295,7 @@
     public File getComponentInstallationDir(String componentName) throws IOException {
         File result = getComponentRootDir(componentName);
         // get the version directory
-        result = FileVersionUtil.getLatestVersionDirectory(result);
-        return result;
+        return FileVersionUtil.getLatestVersionDirectory(result);
     }
 
     public ComponentEnvironment getNewComponentEnvironment(String compName) throws IOException {

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java Sat Aug 11 04:49:18 2007
@@ -297,7 +297,7 @@
      * Return the DefaultBroker instance
      */
     public DefaultBroker getDefaultBroker() {
-        if (broker == null || !(broker instanceof DefaultBroker)) {
+        if (!(broker instanceof DefaultBroker)) {
             throw new IllegalStateException("Broker is not a DefaultBroker");
         }
         return (DefaultBroker) broker;

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ServiceAssemblyEnvironment.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ServiceAssemblyEnvironment.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ServiceAssemblyEnvironment.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ServiceAssemblyEnvironment.java Sat Aug 11 04:49:18 2007
@@ -88,8 +88,7 @@
 
     public File getServiceUnitDirectory(String componentName, String suName) {
         File compDir = FileUtil.getDirectoryPath(susDir, componentName);
-        File suDir = FileUtil.getDirectoryPath(compDir, suName);
-        return suDir;
+        return FileUtil.getDirectoryPath(compDir, suName);
     }
 
 }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AdminCommandsService.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AdminCommandsService.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AdminCommandsService.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AdminCommandsService.java Sat Aug 11 04:49:18 2007
@@ -286,12 +286,12 @@
     public String listComponents(boolean excludeSEs, boolean excludeBCs, boolean excludePojos, String requiredState,
                     String sharedLibraryName, String serviceAssemblyName) throws Exception {
         // validate requiredState
-        if (requiredState != null && requiredState.length() > 0) {
-            if (!LifeCycleMBean.UNKNOWN.equalsIgnoreCase(requiredState) && !LifeCycleMBean.SHUTDOWN.equalsIgnoreCase(requiredState)
-                            && !LifeCycleMBean.STOPPED.equalsIgnoreCase(requiredState)
-                            && !LifeCycleMBean.STARTED.equalsIgnoreCase(requiredState)) {
-                throw ManagementSupport.failure("listComponents", "Required state '" + requiredState + "' is not a valid state.");
-            }
+        if (requiredState != null && requiredState.length() > 0
+                        && !LifeCycleMBean.UNKNOWN.equalsIgnoreCase(requiredState)
+                        && !LifeCycleMBean.SHUTDOWN.equalsIgnoreCase(requiredState)
+                        && !LifeCycleMBean.STOPPED.equalsIgnoreCase(requiredState)
+                        && !LifeCycleMBean.STARTED.equalsIgnoreCase(requiredState)) {
+            throw ManagementSupport.failure("listComponents", "Required state '" + requiredState + "' is not a valid state.");
         }
         // Get components
         Collection connectors = container.getRegistry().getComponents();

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentNameSpace.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentNameSpace.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentNameSpace.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ComponentNameSpace.java Sat Aug 11 04:49:18 2007
@@ -88,7 +88,7 @@
      */
     public boolean equals(Object obj) {
         boolean result = false;
-        if (obj != null && obj instanceof ComponentNameSpace) {
+        if (obj instanceof ComponentNameSpace) {
             ComponentNameSpace other = (ComponentNameSpace) obj;
             result = other.containerName.equals(this.containerName)
                     && other.name.equals(this.name);
@@ -136,8 +136,7 @@
      * @return
      */
     public ComponentNameSpace copy() {
-        ComponentNameSpace result = new ComponentNameSpace(containerName, name);
-        return result;
+        return new ComponentNameSpace(containerName, name);
     }
     
 }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java Sat Aug 11 04:49:18 2007
@@ -472,7 +472,6 @@
             checkSus(saDirectory, sus);
         }
         // Everything seems ok, so deploy all SUs
-        int nbSuccess = 0;
         int nbFailures = 0;
         List<Element> componentResults = new ArrayList<Element>();
         List<String> suKeys = new ArrayList<String>();
@@ -516,7 +515,6 @@
                     getComponentTaskError(e, componentName, componentResults);
                 }
                 if (success) {
-                    nbSuccess++;
                     suKeys.add(registry.registerServiceUnit(sus[i], assemblyName, targetDir));
                 } else {
                     nbFailures++;
@@ -651,14 +649,12 @@
     
     protected Element getElement(Document doc, String name) {
         NodeList l = doc.getElementsByTagNameNS("http://java.sun.com/xml/ns/jbi/management-message", name);
-        Element e = (Element) l.item(0);
-        return e;
+        return (Element) l.item(0);
     }
     
     protected Element getChildElement(Element element, String name) {
         NodeList l = element.getElementsByTagNameNS("http://java.sun.com/xml/ns/jbi/management-message", name);
-        Element e = (Element) l.item(0);
-        return e;
+        return (Element) l.item(0);
     }
 
     protected void undeployServiceUnit(ServiceUnitLifeCycle su) throws DeploymentException {

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java Sat Aug 11 04:49:18 2007
@@ -80,7 +80,7 @@
         this.endpointProcessors = getEndpointProcessors();
     }
     
-    protected List<EndpointProcessor> getEndpointProcessors() {
+    private List<EndpointProcessor> getEndpointProcessors() {
         List<EndpointProcessor> l = new ArrayList<EndpointProcessor>();
         String[] classes = {"org.apache.servicemix.jbi.framework.support.SUDescriptorProcessor",
                             "org.apache.servicemix.jbi.framework.support.WSDL1Processor",

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationContextImpl.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationContextImpl.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationContextImpl.java Sat Aug 11 04:49:18 2007
@@ -191,7 +191,7 @@
      * @exception IllegalArgumentException if the class path elements is null, empty, or if an individual element is
      * ill-formed.
      */
-    public void setClassPathElements(List classPathElements) {
+    public final void setClassPathElements(List classPathElements) {
         if (classPathElements == null) {
             throw new IllegalArgumentException("classPathElements is null");
         }
@@ -204,7 +204,7 @@
                 throw new IllegalArgumentException("classPathElements must contain element of type String");
             }
             String element = (String) obj;
-            String sep = File.separator.equals("\\") ? "/" : "\\";
+            String sep = "\\".equals(File.separator) ? "/" : "\\";
             int offset = element.indexOf(sep);
             if (offset > -1) {
                 throw new IllegalArgumentException("classPathElements contains an invalid file separator '" + sep + "'"); 

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationService.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationService.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationService.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallationService.java Sat Aug 11 04:49:18 2007
@@ -165,8 +165,7 @@
         File componentRoot = environmentContext.getComponentRootDir(componentName);
         ComponentContextImpl context = buildComponentContext(componentRoot, installationDir, componentName);
         installationContext.setContext(context);
-        InstallerMBeanImpl installer = new InstallerMBeanImpl(container, installationContext);
-        return installer;
+        return new InstallerMBeanImpl(container, installationContext);
     }
 
     /**

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallerMBeanImpl.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallerMBeanImpl.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallerMBeanImpl.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/InstallerMBeanImpl.java Sat Aug 11 04:49:18 2007
@@ -69,7 +69,7 @@
         initBootstrap();
     }
     
-    protected void initBootstrap() throws DeploymentException {
+    private void initBootstrap() throws DeploymentException {
         try {
             if (!initialized) {
                 // Unregister a previously registered extension mbean,
@@ -107,7 +107,7 @@
         }
     }
     
-    protected Bootstrap createBootstrap() throws DeploymentException {
+    private Bootstrap createBootstrap() throws DeploymentException {
         ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
         org.apache.servicemix.jbi.deployment.Component descriptor = context.getDescriptor();
         try {
@@ -118,8 +118,7 @@
                                     null);
             Thread.currentThread().setContextClassLoader(cl);
             Class bootstrapClass = cl.loadClass(descriptor.getBootstrapClassName());
-            Bootstrap bs = (Bootstrap) bootstrapClass.newInstance();
-            return bs;
+            return (Bootstrap) bootstrapClass.newInstance();
         } catch (MalformedURLException e) {
             LOG.error("Could not create class loader", e);
             throw new DeploymentException(e);
@@ -290,7 +289,7 @@
      * @throws MalformedURLException
      * @throws DeploymentException
      */
-    protected ClassLoader buildClassLoader(
+    private ClassLoader buildClassLoader(
                     File dir,
                     String[] classPathNames, 
                     boolean parentFirst,

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java Sat Aug 11 04:49:18 2007
@@ -191,8 +191,7 @@
     public ServiceEndpoint activateEndpoint(ComponentContextImpl context, 
                                             QName serviceName,
                                             String endpointName) throws JBIException {
-        InternalEndpoint result = endpointRegistry.registerInternalEndpoint(context, serviceName, endpointName);
-        return result;
+        return endpointRegistry.registerInternalEndpoint(context, serviceName, endpointName);
     }
 
     public ServiceEndpoint[] getEndpointsForComponent(ComponentNameSpace cns) {
@@ -602,8 +601,7 @@
      */
     public InternalEndpoint deregisterSubscription(ComponentContextImpl context, SubscriptionSpec subscription) {
         subscription.setName(context.getComponentNameSpace());
-        InternalEndpoint result = subscriptionRegistry.deregisterSubscription(subscription);
-        return result;
+        return subscriptionRegistry.deregisterSubscription(subscription);
     }
     
     

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java Sat Aug 11 04:49:18 2007
@@ -425,8 +425,7 @@
     
     protected Element getElement(Document doc, String name) {
         NodeList l = doc.getElementsByTagNameNS("http://java.sun.com/xml/ns/jbi/management-message", name);
-        Element e = (Element) l.item(0);
-        return e;
+        return (Element) l.item(0);
     }
 
     public MBeanAttributeInfo[] getAttributeInfos() throws JMException {

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceUnitLifeCycle.java Sat Aug 11 04:49:18 2007
@@ -64,7 +64,7 @@
         this.serviceAssembly = serviceAssembly;
         this.registry = registry;
         this.rootDir = rootDir;
-        Descriptor d = DescriptorFactory.buildDescriptor(getServiceUnitRootPath());
+        Descriptor d = DescriptorFactory.buildDescriptor(rootDir);
         if (d != null) {
             services = d.getServices();
         }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/SharedLibrary.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/SharedLibrary.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/SharedLibrary.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/SharedLibrary.java Sat Aug 11 04:49:18 2007
@@ -62,7 +62,7 @@
         return this.classLoader;
     }
     
-    protected ClassLoader createClassLoader() {
+    private ClassLoader createClassLoader() {
         boolean parentFirst = library.isParentFirstClassLoaderDelegation();
         // Make the current ClassLoader the parent
         ClassLoader parent = getClass().getClassLoader();       
@@ -79,7 +79,7 @@
             }
         }
         return new JarFileClassLoader(
-                        getName(), 
+                        library.getIdentification().getName(), 
                         urls, 
                         parent, 
                         !parentFirst, 

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/DOMStreamReader.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/DOMStreamReader.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/DOMStreamReader.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/DOMStreamReader.java Sat Aug 11 04:49:18 2007
@@ -76,9 +76,13 @@
      * @param element
      */
     public DOMStreamReader(ElementFrame frame) {
-        this.frame = frame;
+        init(frame); // NOPMD
+    }
+
+    private void init(ElementFrame f) {
+        this.frame = f;
         frames.push(this.frame);
-        newFrame(frame);
+        newFrame(f);
     }
 
     protected ElementFrame getCurrentFrame() {

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/SourceTransformer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/SourceTransformer.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/SourceTransformer.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/SourceTransformer.java Sat Aug 11 04:49:18 2007
@@ -313,8 +313,7 @@
     public Node toDOMNode(NormalizedMessage message) throws MessagingException, TransformerException, ParserConfigurationException,
                     IOException, SAXException {
         Source content = message.getContent();
-        Node node = toDOMNode(content);
-        return node;
+        return toDOMNode(content);
     }
 
     /**
@@ -484,8 +483,7 @@
     }
 
     public TransformerFactory createTransformerFactory() {
-        TransformerFactory answer = TransformerFactory.newInstance();
-        return answer;
+        return TransformerFactory.newInstance();
     }
 
 }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StAXSourceTransformer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StAXSourceTransformer.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StAXSourceTransformer.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StAXSourceTransformer.java Sat Aug 11 04:49:18 2007
@@ -141,13 +141,11 @@
     // Implementation methods
     // -------------------------------------------------------------------------
     protected XMLInputFactory createInputFactory() {
-        XMLInputFactory answer = XMLInputFactory.newInstance();
-        return answer;
+        return XMLInputFactory.newInstance();
     }
 
     protected XMLOutputFactory createOutputFactory() {
-        XMLOutputFactory answer = XMLOutputFactory.newInstance();
-        return answer;
+        return XMLOutputFactory.newInstance();
     }
 
 }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReader.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReader.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReader.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReader.java Sat Aug 11 04:49:18 2007
@@ -95,10 +95,10 @@
                 prefix = "";
             }
 
-            if (name != null && name.equals("xmlns")) {
+            if (name != null && "xmlns".equals(name)) {
                 frame.uris.add(value);
                 frame.prefixes.add("");
-            } else if (prefix.length() > 0 && prefix.equals("xmlns")) {
+            } else if (prefix.length() > 0 && "xmlns".equals(prefix)) {
                 frame.uris.add(value);
                 frame.prefixes.add(localName);
             } else if (name.startsWith("xmlns:")) {
@@ -217,8 +217,7 @@
 
     public String getAttributeLocalName(int i) {
         Attr attr = getAttribute(i);
-        String name = getLocalName(attr);
-        return name;
+        return getLocalName(attr);
     }
 
     public String getAttributePrefix(int i) {

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CNamespaceContext.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CNamespaceContext.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CNamespaceContext.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CNamespaceContext.java Sat Aug 11 04:49:18 2007
@@ -71,7 +71,7 @@
             String val = a.getValue();
             if (val != null && val.equals(uri)) {
                 String name = a.getNodeName();
-                if (name.equals("xmlns")) {
+                if ("xmlns".equals(name)) {
                     return "";
                 } else {
                     return name.substring(6);

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jmx/PasswordAuthenticator.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jmx/PasswordAuthenticator.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jmx/PasswordAuthenticator.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jmx/PasswordAuthenticator.java Sat Aug 11 04:49:18 2007
@@ -134,16 +134,12 @@
      * @see #obfuscatePassword(java.lang.String,java.lang.String)
      */
     public static void main(String[] args) throws Exception {
-        if (args.length == 1) {
-            if (!"-help".equals(args[0])) {
-                printPassword("MD5", args[0]);
-                return;
-            }
-        } else if (args.length == 3) {
-            if ("-alg".equals(args[0])) {
-                printPassword(args[1], args[2]);
-                return;
-            }
+        if (args.length == 1 && !"-help".equals(args[0])) {
+            printPassword("MD5", args[0]);
+            return;
+        } else if (args.length == 3 && "-alg".equals(args[0])) {
+            printPassword(args[1], args[2]);
+            return;
         }
         printUsage();
     }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/logging/LogTask.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/logging/LogTask.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/logging/LogTask.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/logging/LogTask.java Sat Aug 11 04:49:18 2007
@@ -25,7 +25,7 @@
 
 public class LogTask extends TimerTask {
 
-    private static Logger logger = Logger.getLogger(LogTask.class);
+    private static final Logger LOG = Logger.getLogger(LogTask.class);
 
     private URL url;
 
@@ -55,10 +55,10 @@
             if (lastConfigured < lastModified && url != null && xml) {
                 DOMConfigurator.configure(url);
                 lastConfigured = System.currentTimeMillis();
-                logger.info("Logging system reconfigured using file: " + url.toString());
+                LOG.info("Logging system reconfigured using file: " + url.toString());
             }
         } catch (Exception ex) {
-            logger.error(ex);
+            LOG.error(ex);
         }
     }
 }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/BaseStandardMBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/BaseStandardMBean.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/BaseStandardMBean.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/BaseStandardMBean.java Sat Aug 11 04:49:18 2007
@@ -385,14 +385,12 @@
      * @throws RuntimeOperationsException
      */
     public void sendNotification(final Notification notification) throws MBeanException, RuntimeOperationsException {
-        if (notification != null) {
-            if (!executorService.isShutdown()) {
-                executorService.execute(new Runnable() {
-                    public void run() {
-                        broadcasterSupport.sendNotification(notification);
-                    }
-                });
-            }
+        if (notification != null && !executorService.isShutdown()) {
+            executorService.execute(new Runnable() {
+                public void run() {
+                    broadcasterSupport.sendNotification(notification);
+                }
+            });
         }
     }
 
@@ -463,7 +461,7 @@
     /**
      * @return notificationInfo
      */
-    public MBeanNotificationInfo[] getNotificationInfo() {
+    public final MBeanNotificationInfo[] getNotificationInfo() {
         MBeanNotificationInfo[] result = new MBeanNotificationInfo[2];
         Descriptor genericDescriptor = new DescriptorSupport(new String[] {
             "name=GENERIC", "descriptorType=notification", "log=T",

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/DefaultBroker.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/DefaultBroker.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/DefaultBroker.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/DefaultBroker.java Sat Aug 11 04:49:18 2007
@@ -395,11 +395,10 @@
             ComponentNameSpace id = ((InternalEndpoint) endpoints[i]).getComponentNameSpace();
             if (id != null) {
                 ComponentMBeanImpl provider = getRegistry().getComponent(id);
-                if (provider != null) {
-                    if (!consumer.getComponent().isExchangeWithProviderOkay(endpoints[i], exchange)
-                                    || !provider.getComponent().isExchangeWithConsumerOkay(endpoints[i], exchange)) {
-                        continue;
-                    }
+                if (provider != null
+                        && (!consumer.getComponent().isExchangeWithProviderOkay(endpoints[i], exchange)
+                                || !provider.getComponent().isExchangeWithConsumerOkay(endpoints[i], exchange))) {
+                    continue;
                 }
             }
             filtered.add(endpoints[i]);

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/FlowProvider.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/FlowProvider.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/FlowProvider.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/FlowProvider.java Sat Aug 11 04:49:18 2007
@@ -54,7 +54,7 @@
         String flowName = getFlowName(flow);
         try {
             value = FINDER.newInstance(flowName);
-            if (value != null && value instanceof Flow) {
+            if (value instanceof Flow) {
                 String query = getQuery(flow);
                 if (query != null) {
                     Map map = URISupport.parseQuery(query);

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlowTibco.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlowTibco.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlowTibco.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlowTibco.java Sat Aug 11 04:49:18 2007
@@ -49,11 +49,9 @@
             Class connFactoryClass = Class.forName("com.tibco.tibjms.TibjmsConnectionFactory");
             if (jmsURL != null) {
                 Constructor cns = connFactoryClass.getConstructor(new Class[] {String.class });
-                ConnectionFactory connFactory = (ConnectionFactory) cns.newInstance(new Object[] {jmsURL });
-                return connFactory;
+                return (ConnectionFactory) cns.newInstance(new Object[] {jmsURL });
             } else {
-                ConnectionFactory connFactory = (ConnectionFactory) connFactoryClass.newInstance();
-                return connFactory;
+                return (ConnectionFactory) connFactoryClass.newInstance();
             }
         } catch (Exception e) {
             throw new RuntimeException("Unable to create Tibco connection factory", e);

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/seda/SedaFlow.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/seda/SedaFlow.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/seda/SedaFlow.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/seda/SedaFlow.java Sat Aug 11 04:49:18 2007
@@ -93,13 +93,9 @@
         if (isClustered(me)) {
             return false;
         }
-        if (isTransacted(me)) {
-            if (!isSynchronous(me)) {
-                // we have the mirror, so the role is the one for the target component
-                if (me.getStatus() == ExchangeStatus.ACTIVE) {
-                    return false;
-                }
-            }
+        // we have the mirror, so the role is the one for the target component
+        if (isTransacted(me) && !isSynchronous(me) && me.getStatus() == ExchangeStatus.ACTIVE) {
+            return false;
         }
         return true;
     }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/acl/impl/AuthorizationEntry.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/acl/impl/AuthorizationEntry.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/acl/impl/AuthorizationEntry.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/acl/impl/AuthorizationEntry.java Sat Aug 11 04:49:18 2007
@@ -59,14 +59,14 @@
         this.service = service;
         this.endpoint = endpoint;
         this.operation = operation;
-        setRoles(roles);
+        this.acls = buildRoles(roles);
     }
     
     public AuthorizationEntry(QName service, String endpoint, QName operation, String roles, String type) {
         this.service = service;
         this.endpoint = endpoint;
         this.operation = operation;
-        setRoles(roles);
+        this.acls = buildRoles(roles);
         this.type = type;
     }
     
@@ -147,12 +147,7 @@
     }
     
     public void setRoles(String roles) {
-        this.acls = new HashSet<GroupPrincipal>();
-        StringTokenizer iter = new StringTokenizer(roles, ",");
-        while (iter.hasMoreTokens()) {
-            String name = iter.nextToken().trim();
-            this.acls.add(new GroupPrincipal(name));
-        }
+        this.acls = buildRoles(roles);
     }
     
     public String getRoles() {
@@ -171,5 +166,15 @@
     
     public String toString() {
         return "AuthorizationEntry[service=" + service + ", endpoint=" + endpoint + ", roles=" + getRoles() + "]";
+    }
+    
+    private Set<GroupPrincipal> buildRoles(String roles) {
+        Set<GroupPrincipal> s = new HashSet<GroupPrincipal>();
+        StringTokenizer iter = new StringTokenizer(roles, ",");
+        while (iter.hasMoreTokens()) {
+            String name = iter.nextToken().trim();
+            s.add(new GroupPrincipal(name));
+        }
+        return s;
     }
 }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/servicedesc/InternalEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/servicedesc/InternalEndpoint.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/servicedesc/InternalEndpoint.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/servicedesc/InternalEndpoint.java Sat Aug 11 04:49:18 2007
@@ -146,7 +146,7 @@
      */
     public boolean equals(Object obj) {
         boolean result = false;
-        if (obj != null && obj instanceof InternalEndpoint) {
+        if (obj instanceof InternalEndpoint) {
             InternalEndpoint other = (InternalEndpoint) obj;
             result = other.serviceName.equals(this.serviceName)
                      && other.endpointName.equals(this.endpointName);

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileUtil.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileUtil.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileUtil.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/FileUtil.java Sat Aug 11 04:49:18 2007
@@ -93,9 +93,10 @@
      */
     public static void copyInputStream(InputStream in, OutputStream out) throws IOException {
         byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
-        int len;
-        while ((len = in.read(buffer)) >= 0) {
+        int len = in.read(buffer);
+        while (len >= 0) {
             out.write(buffer, 0, len);
+            len = in.read(buffer);
         }
         in.close();
         out.close();
@@ -280,12 +281,17 @@
                 continue;
             }
             FileInputStream fis = new FileInputStream(f);
-            ZipEntry anEntry = new ZipEntry(path + f.getName());
-            zos.putNextEntry(anEntry);
-            while ((bytesIn = fis.read(readBuffer)) != -1) {
-                zos.write(readBuffer, 0, bytesIn);
+            try {
+                ZipEntry anEntry = new ZipEntry(path + f.getName());
+                zos.putNextEntry(anEntry);
+                bytesIn = fis.read(readBuffer);
+                while (bytesIn != -1) {
+                    zos.write(readBuffer, 0, bytesIn);
+                    bytesIn = fis.read(readBuffer);
+                }
+            } finally {
+                fis.close();
             }
-            fis.close();
         }
     }
 }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/URISupport.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/URISupport.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/URISupport.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/util/URISupport.java Sat Aug 11 04:49:18 2007
@@ -312,15 +312,15 @@
             int open = 0;
             int closed = 0;
 
-            int i = 0;
-            while ((i = str.indexOf('(', i)) >= 0) {
-                i++;
+            int i = str.indexOf('(');
+            while (i >= 0) {
                 open++;
+                i = str.indexOf('(', i + 1);
             }
-            i = 0;
-            while ((i = str.indexOf(')', i)) >= 0) {
-                i++;
+            i = str.indexOf(')');
+            while (i >= 0) {
                 closed++;
+                i = str.indexOf(')', i + 1);
             }
             result = open == closed;
         }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/view/DotViewService.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/view/DotViewService.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/view/DotViewService.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/view/DotViewService.java Sat Aug 11 04:49:18 2007
@@ -103,16 +103,14 @@
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
         endpointListener.generateFile(pw);
-        String str = sw.toString();
-        return str;
+        return sw.toString();
     }
     
     public String createFlowGraph()  throws Exception {
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
         flowListener.generateFile(pw);
-        String str = sw.toString();
-        return str;
+        return sw.toString();
     }
 
     /**

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/SpringTestSupport.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/SpringTestSupport.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/SpringTestSupport.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/SpringTestSupport.java Sat Aug 11 04:49:18 2007
@@ -106,8 +106,7 @@
             if (element == null) {
                 return "";
             }
-            String text = DOMUtil.getElementText(element);
-            return text;
+            return DOMUtil.getElementText(element);
         } else if (root != null) {
             return root.getNodeValue();
         } else {
@@ -118,8 +117,7 @@
     protected Source getSourceFromClassPath(String fileOnClassPath) {
         InputStream stream = getClass().getResourceAsStream(fileOnClassPath);
         assertNotNull("Could not find file: " + fileOnClassPath + " on the classpath", stream);
-        Source content = new StreamSource(stream);
-        return content;
+        return new StreamSource(stream);
     }
 
     protected void assertMessagesReceived(MessageList messageList, int count) throws MessagingException, TransformerException,

Modified: incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/RemoteServiceMixClientTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/RemoteServiceMixClientTest.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/RemoteServiceMixClientTest.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/RemoteServiceMixClientTest.java Sat Aug 11 04:49:18 2007
@@ -28,7 +28,7 @@
         ((RemoteServiceMixClient) client).shutDown();
         super.tearDown();
         Set servers = VMTransportFactory.servers.keySet();
-        String[] serverNames = (String[]) servers.toArray(new String[0]);
+        String[] serverNames = (String[]) servers.toArray(new String[servers.size()]);
         for (int i = 0; i < serverNames.length; i++) {
             VMTransportFactory.stopped(serverNames[i]);
         }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/DeploymentMessageTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/DeploymentMessageTest.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/DeploymentMessageTest.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/DeploymentMessageTest.java Sat Aug 11 04:49:18 2007
@@ -209,7 +209,7 @@
         CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
         XObject list = cachedXPathAPI.eval(node, xpath, new PrefixResolver() {
             public String getNamespaceForPrefix(String prefix) {
-                if (prefix.equals("jbi")) {
+                if ("jbi".equals(prefix)) {
                     return "http://java.sun.com/xml/ns/jbi/management-message";
                 }
                 return null;
@@ -230,8 +230,7 @@
             if (element == null) {
                 return "";
             }
-            String text = DOMUtil.getElementText(element);
-            return text;
+            return DOMUtil.getElementText(element);
         } else if (root != null) {
             return root.getNodeValue();
         } else {

Modified: incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReaderTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReaderTest.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReaderTest.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReaderTest.java Sat Aug 11 04:49:18 2007
@@ -67,8 +67,7 @@
     private Document getDocument() throws Exception {
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
-        Document doc = factory.newDocumentBuilder().newDocument();
-        return doc;
+        return factory.newDocumentBuilder().newDocument();
     }
 
     public void testTextChild() throws Exception {

Modified: incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/messaging/JcaFlowPersistentTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/messaging/JcaFlowPersistentTest.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/messaging/JcaFlowPersistentTest.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/messaging/JcaFlowPersistentTest.java Sat Aug 11 04:49:18 2007
@@ -43,8 +43,7 @@
     }
 
     protected Flow createFlow() {
-        JCAFlow flow = new JCAFlow("tcp://localhost:61216");
-        return flow;
+        return new JCAFlow("tcp://localhost:61216");
     }
 
     public void testSyncSendSyncReceive() throws Exception {

Modified: incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/messaging/JcaFlowTransactionTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/messaging/JcaFlowTransactionTest.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/messaging/JcaFlowTransactionTest.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/messaging/JcaFlowTransactionTest.java Sat Aug 11 04:49:18 2007
@@ -42,8 +42,7 @@
     }
 
     protected Flow createFlow() {
-        JCAFlow flow = new JCAFlow("tcp://localhost:61216");
-        return flow;
+        return new JCAFlow("tcp://localhost:61216");
     }
 
     public void testSyncSendSyncReceive() throws Exception {

Modified: incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/nmr/flow/jms/StatelessJmsFlowTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/nmr/flow/jms/StatelessJmsFlowTest.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/nmr/flow/jms/StatelessJmsFlowTest.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/nmr/flow/jms/StatelessJmsFlowTest.java Sat Aug 11 04:49:18 2007
@@ -85,8 +85,8 @@
     }
 
     public void testStatelessConsumer() throws Exception {
-        StatelessEcho echo1 = activateProvider(jbi1, false);
-        StatelessEcho echo2 = activateProvider(jbi2, false);
+        activateProvider(jbi1, false);
+        activateProvider(jbi2, false);
         StatelessSender sender1 = activateConsumer(jbi1);
         StatelessSender sender2 = activateConsumer(jbi2);
 
@@ -108,8 +108,8 @@
     }
 
     public void testStatefullConsumer() throws Exception {
-        StatelessEcho echo1 = activateProvider(jbi1, false);
-        StatelessEcho echo2 = activateProvider(jbi2, false);
+        activateProvider(jbi1, false);
+        activateProvider(jbi2, false);
         StatelessSender sender1 = activateConsumer(jbi1);
         StatelessSender sender2 = activateConsumer(jbi2);
 
@@ -134,7 +134,7 @@
         StatelessEcho echo1 = activateProvider(jbi1, true);
         StatelessEcho echo2 = activateProvider(jbi2, true);
         StatelessSender sender1 = activateConsumer(jbi1);
-        StatelessSender sender2 = activateConsumer(jbi2);
+        activateConsumer(jbi2);
 
         sender1.sendMessages(100, false);
 
@@ -161,7 +161,7 @@
         StatelessEcho echo1 = activateProvider(jbi1, false);
         StatelessEcho echo2 = activateProvider(jbi2, false);
         StatelessSender sender1 = activateConsumer(jbi1);
-        StatelessSender sender2 = activateConsumer(jbi2);
+        activateConsumer(jbi2);
 
         sender1.sendMessages(100, false);
 

Modified: incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/GroupPrincipalTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/GroupPrincipalTest.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/GroupPrincipalTest.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/GroupPrincipalTest.java Sat Aug 11 04:49:18 2007
@@ -51,8 +51,8 @@
 
         assertTrue(p1.equals(p1));
         assertTrue(p1.equals(p2));
-        assertFalse(p1.equals(null));
-        assertFalse(p1.equals("FOO"));
+        assertFalse(p1.equals((Object) null)); // NOPMD just testing
+        assertFalse(p1.equals(new Object())); // NOPMD just testing
         assertFalse(p1.equals(p3));
     }
 }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/UserPrincipalTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/UserPrincipalTest.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/UserPrincipalTest.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/jbi/security/UserPrincipalTest.java Sat Aug 11 04:49:18 2007
@@ -44,6 +44,7 @@
         assertEquals(p1.hashCode(), p2.hashCode());
     }
 
+    @SuppressWarnings("PMD.PositionLiteralsFirstInComparisons")
     public void testEquals() {
         UserPrincipal p1 = new UserPrincipal("FOO");
         UserPrincipal p2 = new UserPrincipal("FOO");
@@ -51,8 +52,8 @@
 
         assertTrue(p1.equals(p1));
         assertTrue(p1.equals(p2));
-        assertFalse(p1.equals(null));
-        assertFalse(p1.equals("FOO"));
+        assertFalse(p1.equals((Object) null)); // NOPMD just testing
+        assertFalse(p1.equals(new Object())); // NOPMD just testing
         assertFalse(p1.equals(p3));
     }
 }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/remoting/RemoteServiceMixClientTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/remoting/RemoteServiceMixClientTest.java?view=diff&rev=564900&r1=564899&r2=564900
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/remoting/RemoteServiceMixClientTest.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/remoting/RemoteServiceMixClientTest.java Sat Aug 11 04:49:18 2007
@@ -27,7 +27,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.client.ServiceMixClient;
-import org.apache.servicemix.jbi.container.SpringJBIContainer;
 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 
@@ -54,7 +53,7 @@
     protected void setUp() throws Exception {
         context = createBeanFactory();
         client = (ServiceMixClient) getBean("client");
-        SpringJBIContainer jbi = (SpringJBIContainer) getBean("jbi");
+        assertNotNull(getBean("jbi"));
     }
 
     protected Object getBean(String name) {



Mime
View raw message