Return-Path: Delivered-To: apmail-camel-commits-archive@www.apache.org Received: (qmail 22939 invoked from network); 2 Mar 2009 04:23:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Mar 2009 04:23:12 -0000 Received: (qmail 77574 invoked by uid 500); 2 Mar 2009 04:23:12 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 77548 invoked by uid 500); 2 Mar 2009 04:23:12 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 77539 invoked by uid 99); 2 Mar 2009 04:23:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Mar 2009 20:23:12 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2009 04:23:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BA5B623889B2; Mon, 2 Mar 2009 04:22:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r749180 - in /camel/trunk/components/camel-web/src: main/java/org/apache/camel/web/model/ main/java/org/apache/camel/web/resources/ test/java/org/apache/camel/web/ test/java/org/apache/camel/web/htmlunit/ test/java/org/apache/camel/web/html... Date: Mon, 02 Mar 2009 04:22:41 -0000 To: commits@camel.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090302042242.BA5B623889B2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ningjiang Date: Mon Mar 2 04:22:41 2009 New Revision: 749180 URL: http://svn.apache.org/viewvc?rev=749180&view=rev Log: Fixed the CS error of camel-web Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/model/Endpoints.java camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelChildResourceSupport.java camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelContextResource.java camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/ConvertersFromResource.java camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/ConvertersResource.java camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteStatusResource.java camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/Main.java camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/CreateEndpointTest.java camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/HtmlTestSupport.java camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/pages/EndpointsPage.java camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/pages/SendMessagePage.java Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/model/Endpoints.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/model/Endpoints.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/model/Endpoints.java (original) +++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/model/Endpoints.java Mon Mar 2 04:22:41 2009 @@ -16,18 +16,19 @@ */ package org.apache.camel.web.model; -import org.apache.camel.CamelContext; -import org.apache.camel.Endpoint; -import org.apache.camel.util.ObjectHelper; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; + +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.util.ObjectHelper; /** * @version $Revision$ @@ -63,8 +64,8 @@ public void load(CamelContext camelContext) { ObjectHelper.notNull(camelContext, "camelContext has not been injected!"); - Map map = camelContext.getEndpointMap(); - Set> entries = map.entrySet(); + Map map = camelContext.getEndpointMap(); + Set> entries = map.entrySet(); for (Map.Entry entry : entries) { addEndpoint(createEndpointLink(entry.getKey(), entry.getValue())); } Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelChildResourceSupport.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelChildResourceSupport.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelChildResourceSupport.java (original) +++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelChildResourceSupport.java Mon Mar 2 04:22:41 2009 @@ -19,8 +19,8 @@ import com.sun.jersey.api.view.ImplicitProduces; import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; -import org.apache.camel.spi.TypeConverterRegistry; import org.apache.camel.impl.converter.DefaultTypeConverter; +import org.apache.camel.spi.TypeConverterRegistry; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -59,8 +59,7 @@ TypeConverterRegistry converterRegistry = getCamelContext().getTypeConverterRegistry(); if (converterRegistry instanceof DefaultTypeConverter) { return (DefaultTypeConverter) converterRegistry; - } - else { + } else { LOG.info("Not a default type converter as it is: " + converterRegistry); } return null; Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelContextResource.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelContextResource.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelContextResource.java (original) +++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelContextResource.java Mon Mar 2 04:22:41 2009 @@ -16,6 +16,9 @@ */ package org.apache.camel.web.resources; +import java.util.Map; +import java.util.TreeMap; + import javax.annotation.PreDestroy; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -25,17 +28,12 @@ import com.sun.jersey.api.view.ImplicitProduces; import com.sun.jersey.spi.inject.Inject; import com.sun.jersey.spi.resource.Singleton; + import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; -import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.impl.ServiceSupport; import org.apache.camel.web.model.Camel; -import java.util.TreeMap; -import java.util.Map; -import java.util.Properties; -import java.util.Set; - /** * The root Camel resource from which all other resources can be navigated such as for endpoints * or routes Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/ConvertersFromResource.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/ConvertersFromResource.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/ConvertersFromResource.java (original) +++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/ConvertersFromResource.java Mon Mar 2 04:22:41 2009 @@ -1,5 +1,4 @@ /** - * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -7,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,14 +16,12 @@ */ package org.apache.camel.web.resources; -import org.apache.camel.impl.converter.DefaultTypeConverter; -import org.apache.camel.TypeConverter; - -import java.util.HashMap; import java.util.Map; -import java.util.Set; import java.util.TreeMap; +import org.apache.camel.TypeConverter; +import org.apache.camel.impl.converter.DefaultTypeConverter; + /** * @version $Revision: 1.1 $ */ Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/ConvertersResource.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/ConvertersResource.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/ConvertersResource.java (original) +++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/ConvertersResource.java Mon Mar 2 04:22:41 2009 @@ -1,5 +1,4 @@ /** - * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -7,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,17 +16,18 @@ */ package org.apache.camel.web.resources; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; + import org.apache.camel.impl.converter.DefaultTypeConverter; import org.apache.camel.util.ObjectHelper; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; - /** * @version $Revision: 1.1 $ */ Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java (original) +++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java Mon Mar 2 04:22:41 2009 @@ -18,16 +18,14 @@ import java.io.IOException; import java.io.StringWriter; -import java.util.List; + import javax.ws.rs.GET; -import javax.ws.rs.Produces; import javax.ws.rs.Path; -import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; -import javax.xml.transform.Result; import org.apache.camel.model.RouteType; import org.apache.camel.view.RouteDotGenerator; Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteStatusResource.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteStatusResource.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteStatusResource.java (original) +++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteStatusResource.java Mon Mar 2 04:22:41 2009 @@ -1,5 +1,4 @@ /** - * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -7,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,10 +16,7 @@ */ package org.apache.camel.web.resources; -import com.sun.jersey.api.representation.Form; -import org.apache.camel.CamelContext; -import org.apache.camel.ServiceStatus; -import org.apache.camel.model.RouteType; +import java.net.URI; import javax.ws.rs.Consumes; import javax.ws.rs.GET; @@ -28,7 +24,12 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import java.net.URI; + +import com.sun.jersey.api.representation.Form; + +import org.apache.camel.CamelContext; +import org.apache.camel.ServiceStatus; +import org.apache.camel.model.RouteType; /** * Represents the status of a single single Camel Route which is used to implement one or more Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/Main.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/Main.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/Main.java (original) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/Main.java Mon Mar 2 04:22:41 2009 @@ -30,7 +30,7 @@ */ public final class Main { - public static int PORT = 9998; + public static int mainPort = 9998; public static final String WEBAPP_DIR = "src/main/webapp"; @@ -47,17 +47,17 @@ String text = args[0]; int port = Integer.parseInt(text); if (port > 0) { - PORT = port; + mainPort = port; } } start(); } public static void start() throws Exception { - System.out.println("Starting Web Server on port: " + PORT); + System.out.println("Starting Web Server on port: " + mainPort); SelectChannelConnector connector = new SelectChannelConnector(); - connector.setPort(PORT); + connector.setPort(mainPort); connector.setServer(server); WebAppContext context = new WebAppContext(); @@ -84,6 +84,6 @@ * Returns the root URL of the application */ public static String getRootUrl() { - return "http://localhost:" + PORT + WEBAPP_CTX; + return "http://localhost:" + mainPort + WEBAPP_CTX; } } Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/CreateEndpointTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/CreateEndpointTest.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/CreateEndpointTest.java (original) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/CreateEndpointTest.java Mon Mar 2 04:22:41 2009 @@ -1,5 +1,4 @@ /** - * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -7,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,23 +16,22 @@ */ package org.apache.camel.web.htmlunit; +import java.util.List; + import org.apache.camel.web.htmlunit.pages.EndpointsPage; import org.apache.camel.web.htmlunit.pages.SendMessagePage; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import static org.openqa.selenium.lift.Finders.link; +import org.openqa.selenium.WebElement; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.not; +import static org.openqa.selenium.By.xpath; import static org.openqa.selenium.lift.Finders.links; -import static org.openqa.selenium.lift.Finders.title; import static org.openqa.selenium.lift.Matchers.atLeast; import static org.openqa.selenium.lift.Matchers.text; -import org.openqa.selenium.WebElement; -import static org.openqa.selenium.By.xpath; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.*; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.util.List; /** * @version $Revision: 1.1 $ @@ -79,7 +77,7 @@ findElement(xpath("//a[@class='message']")).click(); String actualMessage = findElement(xpath("//div[@class='message']")).getText(); - LOG.info("Found message body: " +actualMessage); + LOG.info("Found message body: " + actualMessage); assertThat(actualMessage, containsString(messageBody)); Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/HtmlTestSupport.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/HtmlTestSupport.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/HtmlTestSupport.java (original) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/HtmlTestSupport.java Mon Mar 2 04:22:41 2009 @@ -1,5 +1,4 @@ /** - * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -7,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,15 +16,16 @@ */ package org.apache.camel.web.htmlunit; +import java.util.List; + +import com.gargoylesoftware.htmlunit.WebClient; + import org.apache.camel.web.Main; +import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; -import org.openqa.selenium.By; import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.lift.HamcrestWebDriverTestCase; -import com.gargoylesoftware.htmlunit.WebClient; - -import java.util.List; /** * @version $Revision: 1.1 $ Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/pages/EndpointsPage.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/pages/EndpointsPage.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/pages/EndpointsPage.java (original) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/pages/EndpointsPage.java Mon Mar 2 04:22:41 2009 @@ -1,5 +1,4 @@ /** - * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -7,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,10 +16,10 @@ */ package org.apache.camel.web.htmlunit.pages; -import static org.openqa.selenium.By.name; -import static org.openqa.selenium.By.xpath; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import static org.openqa.selenium.By.name; +import static org.openqa.selenium.By.xpath; /** * @version $Revision: 1.1 $ Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/pages/SendMessagePage.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/pages/SendMessagePage.java?rev=749180&r1=749179&r2=749180&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/pages/SendMessagePage.java (original) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/pages/SendMessagePage.java Mon Mar 2 04:22:41 2009 @@ -1,5 +1,4 @@ /** - * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -7,7 +6,7 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,10 +16,10 @@ */ package org.apache.camel.web.htmlunit.pages; -import static org.openqa.selenium.By.name; -import static org.openqa.selenium.By.xpath; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import static org.openqa.selenium.By.name; +import static org.openqa.selenium.By.xpath; /** * @version $Revision: 1.1 $