Skip to content

Commit

Permalink
CAMEL-12816: CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aldettinger committed Sep 20, 2018
1 parent 6c8c11d commit 444021a
Show file tree
Hide file tree
Showing 64 changed files with 41 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private class ThrottlingState {
private final String key;
private final DelayQueue<ThrottlePermit> delayQueue = new DelayQueue<>();
private final AtomicReference<ScheduledFuture<?>> cleanFuture = new AtomicReference<>();
private volatile int throttleRate = 0;
private volatile int throttleRate;

ThrottlingState(String key) {
this.key = key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public void bind(CamelContext camelContext, String record, Map<String, Object> m

// skip ahead if the expected position is greater than the offset
if (dataField.pos() > offset) {
LOG.debug("skipping ahead [{}] chars.", (dataField.pos() - offset));
LOG.debug("skipping ahead [{}] chars.", dataField.pos() - offset);
offset = dataField.pos();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.component.elasticsearch5;
import org.junit.Before;
import org.junit.After;

import java.io.IOException;
import java.net.InetAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.component.elasticsearch5;
import org.junit.Before;
import org.junit.After;

import java.net.InetAddress;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
* limitations under the License.
*/
package org.apache.camel.processor.idempotent.hazelcast;
import org.junit.Before;
import org.junit.After;

import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class HazelcastIdempotentRepositoryTest extends CamelTestSupport {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.example;
import org.junit.Before;

import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
Expand All @@ -29,6 +27,7 @@
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.converter.jaxb.JaxbDataFormat;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Before;
import org.junit.Test;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.example;
import org.junit.Before;

import java.io.File;

import javax.xml.bind.JAXBContext;
Expand All @@ -26,6 +24,7 @@
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.converter.jaxb.JaxbDataFormat;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Before;
import org.junit.Test;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@

import java.io.InputStream;

import org.apache.camel.util.StringHelper;
import org.xml.sax.InputSource;

import com.thaiopensource.relaxng.SchemaFactory;
import com.thaiopensource.validate.Schema;
import com.thaiopensource.xml.sax.Jaxp11XMLReaderCreator;

import org.apache.camel.Component;
import org.apache.camel.Consumer;
import org.apache.camel.Processor;
Expand All @@ -35,6 +33,7 @@
import org.apache.camel.spi.UriParam;
import org.apache.camel.spi.UriPath;
import org.apache.camel.util.ResourceHelper;
import org.apache.camel.util.StringHelper;

/**
* Validates the payload of a message using RelaxNG Syntax using Jing library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.processor.jpa;
import org.junit.Before;

import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
Expand All @@ -29,6 +27,7 @@
import org.apache.camel.spring.SpringRouteBuilder;
import org.apache.camel.util.ObjectHelper;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.expression.BeanFactoryResolver;
import org.springframework.expression.Expression;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.processor.jpa;
import org.junit.Before;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
Expand All @@ -27,6 +25,7 @@
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.examples.VersionedItem;
import org.apache.camel.spring.SpringRouteBuilder;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.jsonpath;
import org.junit.After;

import java.io.File;
import java.lang.reflect.Field;
import java.nio.charset.Charset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.component.olingo4;
import org.junit.Before;
import org.junit.After;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.test.spring;
import org.junit.Before;

import java.io.File;

import org.apache.camel.management.ManagedManagementStrategy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.Locale;

import junit.framework.TestCase;

import org.apache.camel.CamelContext;
import org.apache.camel.Channel;
import org.apache.camel.Endpoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;

import javax.management.AttributeNotFoundException;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.model.ProcessorDefinition;
import org.apache.camel.test.junit4.CamelTestSupport;

import org.junit.Test;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
*/
package org.apache.camel.test.patterns;

import org.junit.Test;

import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.model.ProcessorDefinition;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;

/**
* @version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
* limitations under the License.
*/
package org.apache.camel.test.patterns;
import org.junit.Before;

import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Before;
import org.junit.Test;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;

import org.junit.Test;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
* limitations under the License.
*/
package org.apache.camel.test.patterns;
import org.junit.Before;

import org.apache.camel.Predicate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Before;
import org.junit.Test;

public class RouteBuilderConfigureExceptionTest extends CamelTestSupport {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
* limitations under the License.
*/
package org.apache.camel.test.patterns;
import org.junit.After;

import org.apache.camel.RoutesBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.After;
import org.junit.Test;

public class RouteProcessorDumpRouteCoverageTest extends CamelTestSupport {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.component.urlrewrite;
import org.junit.Before;

import java.util.Properties;
import java.util.concurrent.atomic.AtomicInteger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.example.reportincident;
import org.junit.Before;
import org.junit.After;

import java.io.File;
import java.io.FileOutputStream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.example.camel.transport;
import org.junit.Before;
import org.junit.After;

import java.net.MalformedURLException;

import org.apache.camel.test.AvailablePortFinder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
* limitations under the License.
*/
package org.apache.camel.example.cxf.jaxrs;
import org.junit.Before;
import org.junit.After;

import org.apache.camel.example.cxf.jaxrs.resources.Book;
import org.apache.camel.example.cxf.jaxrs.resources.BookNotFoundFault;
import org.apache.camel.example.cxf.jaxrs.resources.BookStore;
import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.test.spring.CamelSpringTestSupport;
import org.apache.cxf.BusFactory;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
*/
package org.apache.camel.example.guice.jms;

import org.junit.Test;

import org.junit.Assert;
import org.apache.camel.guice.Main;
import org.junit.Assert;
import org.junit.Test;

/**
* @version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.loanbroker;
import org.junit.Before;

import java.io.File;
import java.io.FileOutputStream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.example.reportincident;
import org.junit.Before;

import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.example.reportincident;
import org.junit.Before;

import java.io.File;
import java.io.FileOutputStream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.example;
import org.junit.Before;
import org.junit.After;

import java.io.File;
import java.io.FileOutputStream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/
package org.apache.camel.example;
import org.junit.Before;

import java.io.File;
import java.io.FileOutputStream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
*/
package org.apache.camel.example.spring;

import org.junit.Test;

import org.junit.Assert;
import org.apache.camel.spring.Main;
import org.junit.Assert;
import org.junit.Test;

/**
* @version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
import java.util.List;
import java.util.Set;

import org.junit.Assert;
import org.apache.camel.catalog.CamelCatalog;
import org.apache.camel.catalog.DefaultCamelCatalog;
import org.apache.camel.catalog.connector.CamelConnectorCatalog;
import org.apache.camel.catalog.connector.ConnectorDto;
import org.apache.camel.catalog.connector.DefaultCamelConnectorCatalog;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

Expand Down
Loading

0 comments on commit 444021a

Please sign in to comment.