fixing checkstyle on example

This commit is contained in:
Clebert Suconic 2015-09-11 10:16:28 -04:00
parent 243a94176d
commit 490662923c
3 changed files with 11 additions and 11 deletions

View File

@ -78,7 +78,7 @@ under the License.
<goal>runClient</goal>
</goals>
<configuration>
<clientClass>org.apache.activemq.artemis.jms.example.ProtonJExample</clientClass>
<clientClass>org.apache.activemq.artemis.jms.example.AMQPQueueExample</clientClass>
</configuration>
</execution>
<execution>

View File

@ -18,13 +18,15 @@ package org.apache.activemq.artemis.jms.example;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.*;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import org.apache.qpid.jms.JmsConnectionFactory;
public class ProtonJExample {
public class AMQPQueueExample {
public static void main(String[] args) throws Exception {
Connection connection = null;
@ -32,7 +34,6 @@ public class ProtonJExample {
try {
// Step 1. Create an amqp qpid 1.0 connection
connection = connectionFactory.createConnection();
@ -51,7 +52,6 @@ public class ProtonJExample {
// Step 5. create a moving receiver, this means the message will be removed from the queue
MessageConsumer consumer = session.createConsumer(queue);
// Step 7. receive the simple message
TextMessage m = (TextMessage) consumer.receive(5000);
System.out.println("message = " + m.getText());

View File

@ -61,13 +61,13 @@ public class LinkedListTest extends ActiveMQTestBase {
LinkedListImpl<MyObject> objs = new LinkedListImpl<MyObject>();
// Initial add
for (int i = 0; i < 1000; i++) {
for (int i = 0; i < 100; i++) {
objs.addTail(new MyObject());
}
LinkedListIterator<MyObject> iter = objs.iterator();
for (int i = 0; i < 5000; i++) {
for (int i = 0; i < 500; i++) {
for (int add = 0; add < 1000; add++) {
objs.addTail(new MyObject());
@ -78,12 +78,12 @@ public class LinkedListTest extends ActiveMQTestBase {
iter.remove();
}
if (i % 1000 == 0) {
assertCount(1000, count);
if (i % 100 == 0) {
assertCount(100, count);
}
}
assertCount(1000, count);
assertCount(100, count);
while (iter.hasNext()) {
iter.next();